feat: replace device location select with input field for direct entry in DetailDevice component
This commit is contained in:
@@ -215,12 +215,6 @@ const DetailDevice = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleSelectChange = (value) => {
|
||||
setFormData({
|
||||
...FormData,
|
||||
device_location: value,
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
@@ -366,16 +360,13 @@ const DetailDevice = (props) => {
|
||||
<div style={{ marginBottom: 12 }}>
|
||||
<Text strong>Device Location</Text>
|
||||
<Text style={{ color: 'red' }}> *</Text>
|
||||
<Select
|
||||
<Input
|
||||
type="text"
|
||||
name="device_location"
|
||||
value={FormData.device_location}
|
||||
onChange={handleSelectChange}
|
||||
disabled={props.readOnly}
|
||||
style={{ width: '100%' }}
|
||||
placeholder="Select Location"
|
||||
options={[
|
||||
{ value: 'Building A', label: 'Building A' },
|
||||
{ value: 'Building B', label: 'Building B' },
|
||||
]}
|
||||
onChange={handleInputChange}
|
||||
placeholder="Enter Device Location"
|
||||
readOnly={props.readOnly}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ marginBottom: 12 }}>
|
||||
|
||||
Reference in New Issue
Block a user