IO-3515 set po context, update confidence UI showing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user