diff --git a/package.json b/package.json index 8c7adc1..3aca11b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "2.9.9", + "version": "3.0.0", "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/np-picker/NPPicker.tsx b/src/components/np-picker/NPPicker.tsx index 8c8981b..89bb7f5 100644 --- a/src/components/np-picker/NPPicker.tsx +++ b/src/components/np-picker/NPPicker.tsx @@ -31,7 +31,11 @@ function NPPicker(props: { const [addingPoss, setAddingPoss] = useState(false); const [npType, setNpType] = useState(props.np ? props.np.selection.type : undefined); const onChange = (np: T.NPSelection | undefined) => { - props.onChange(ensureSingleShrink(props.np, np)) + props.onChange(ensureSingleShrink(props.np, np)); + if ((np?.selection.type === "noun" || np?.selection.type === "participle") && np.selection.possesor) { + setAddingPoss(true); + } + setAddingPoss(false); } useEffect(() => { setNpType(props.np ? props.np.selection.type : undefined);