handle change data in doctor model, set previous data when user close modal, update list doctor after update data and change key name in url
This commit is contained in:
@@ -48,12 +48,12 @@ function ModalSearchCity() {
|
||||
useEffect(() => {
|
||||
if (selected.first) {
|
||||
const selectedState = states.find(
|
||||
(state) => state.label === selected.first,
|
||||
(state) => state.label === selected.first
|
||||
);
|
||||
if (selectedState) {
|
||||
const stateId = selectedState.id;
|
||||
const filteredCities = cities.filter(
|
||||
(city) => city.province_id === stateId,
|
||||
(city) => city.province_id === stateId
|
||||
);
|
||||
setFilteredCities(filteredCities);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user