From ebdfc33de1f1ab3094f6db4de5f46ff446364d09 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Wed, 20 Apr 2022 22:58:34 +0500 Subject: [PATCH] fix with active/passive --- package.json | 2 +- src/components/vp-explorer/TensePicker.tsx | 14 +++++++++++++- src/components/vp-explorer/VerbPicker.tsx | 11 ++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 45e3daf..ed47f94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "2.1.5", + "version": "2.1.6", "author": "lingdocs.com", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "homepage": "https://verbs.lingdocs.com", diff --git a/src/components/vp-explorer/TensePicker.tsx b/src/components/vp-explorer/TensePicker.tsx index b8808a3..d0b4345 100644 --- a/src/components/vp-explorer/TensePicker.tsx +++ b/src/components/vp-explorer/TensePicker.tsx @@ -177,6 +177,7 @@ function TensePicker(props: ({ ...props.vps, verb: { ...props.vps.verb, + voice: "active", tenseCategory: value, }, })); @@ -196,6 +197,8 @@ function TensePicker(props: ({ : ("vps" in props && (props.vps.verb?.tenseCategory === "imperative")) ? imperativeTenseOptions : verbTenseOptions; + const showImperativeOption = ("vps" in props && props.vps.verb.voice === "active") + || ("vpsComplete" in props && props.vpsComplete.verb.voice !== "active"); return