possesive adding bug

This commit is contained in:
lingdocs 2022-06-20 18:22:37 -05:00
parent 96b91e6336
commit 82a7099b35
2 changed files with 6 additions and 2 deletions

View File

@ -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",

View File

@ -31,7 +31,11 @@ function NPPicker(props: {
const [addingPoss, setAddingPoss] = useState<boolean>(false);
const [npType, setNpType] = useState<T.NPType | undefined>(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);