Hi, I m using mui select and it’s label stays in r...
# react
s
Hi, I m using mui select and it’s label stays in rest state if i programatically set value in it’s state (in case of edit operation), however when I change the value in dropdown, label shifts upwards and dropdown work perfectly, attached is the code and screenshot.
_Grid_ *{*
item = true
_xs_ = 12
_sm_ = 6
_md_ = 4
_FormControl_ *{*
fullWidth = true
_InputLabel_ *{*
+FacilityFields._STATE_.description
}
error = facilityValidationState.stateErrorState
_Select_ *{*
label = _ReactNode_(FacilityFields._STATE_.description)
value = facilityState.state onChange =
*{* event, _ *->*
setFacilityState(
facilityState.copy(
state = event.target.value
)
)
}
onBlur = *{*
_validateState_(facilityState, facilityValidationState, setFacilityValidationState)
}
for (state in USAStates._entries_) {
_MenuItem_ *{*
value = state.postalAbbreviation
+state.state
}
}
}
_FormHelperText_ *{*
+facilityValidationState.stateErrorMessage
}
} }