Skip to content

Commit

Permalink
Merge pull request #428 from beda-software/patch-question-quantity-value
Browse files Browse the repository at this point in the history
PATCH: QuestionQuantity used wrong path to initial value
  • Loading branch information
alexlipovka authored Jan 17, 2025
2 parents 6c1d4fd + 18716b2 commit 6972d0f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function QuestionQuantity(props: QuestionItemProps) {
const fieldName = [...parentPath, linkId, 0, 'value', 'Quantity'];
const { value, onChange, disabled, formItem, placeholder } = useFieldController(fieldName, questionItem);

const [numericValue, setNumericValue] = useState<number | undefined>(value);
const [numericValue, setNumericValue] = useState<number | undefined>(value?.value);
const [selectedUnit, setSelectedUnit] = useState(unitOption?.[0]);

const onUnitChange = (unitDisplay: string) => {
Expand Down

0 comments on commit 6972d0f

Please sign in to comment.