IO-3515 set po context, update confidence UI showing

This commit is contained in:
Patrick Fic
2026-02-18 11:57:56 -08:00
parent d4bbdd7383
commit 5d53d09af9
9 changed files with 77 additions and 42 deletions

View File

@@ -10,8 +10,14 @@ const { Option } = Select;
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) {
setOption(value);
}
}, [value]);
useEffect(() => {
console.log("*** ~ VendorSearchSelect ~ USEEFFECT:", value, option);
if (value !== option && onChange) {
if (value && !option) {
onChange(value);