Merge branch 'feature/IO-3515-ocr-bill-posting' into release/2026-02-27

This commit is contained in:
Patrick Fic
2026-02-23 11:28:45 -08:00
29 changed files with 3337 additions and 1619 deletions

View File

@@ -8,11 +8,19 @@ import PhoneNumberFormatter from "../../utils/PhoneFormatter";
const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, preferredMake, showPhone, ref }) => {
const [option, setOption] = useState(value);
// Sync internal state when value prop changes (e.g., from form.setFieldsValue)
useEffect(() => {
if (value !== option && onChange) {
onChange(option);
if (value !== option) {
setOption(value);
}
}, [value, option, onChange]);
}, [value, option]);
const handleChange = (newValue) => {
setOption(newValue);
if (onChange) {
onChange(newValue);
}
};
const favorites =
preferredMake && options
@@ -103,7 +111,7 @@ const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, pref
);
}}
popupMatchSelectWidth={false}
onChange={setOption}
onChange={handleChange}
onSelect={onSelect}
disabled={disabled || false}
optionLabelProp="name"