| | |
| | | import { Select, MenuItem, FormControl, InputLabel } from '@mui/material'; |
| | | |
| | | const WarehouseSelect = (props) => { |
| | | const { dictTypeCode, label, name, validate, ...params } = props; |
| | | const { dictTypeCode, label, name, validate, onChange, ...params } = props; |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const [list, setList] = useState([]); |
| | |
| | | const handleChange = (event) => { |
| | | const selectedValue = event.target.value; |
| | | field.onChange(selectedValue); |
| | | if (onChange) { |
| | | onChange(event); |
| | | } |
| | | }; |
| | | |
| | | const validValue = list.some(item => item.id === field.value) ? field.value : ''; |