Files
ota-admin-portal/src/components/Controls/DropDownList/index.jsx
John Wu 9cf84fc426 CEC-3672 Update manifest version on deploy (#277)
* CEC-3672 Add versions to CarUpdatesContext
Stub out getSoftwareVersions and updateManifestVersion

* CEC-3672 update version on deploy

* Validate version before updating
2023-02-09 11:51:23 -08:00

25 lines
683 B
JavaScript

import { FormControl, InputLabel, Select } from "@material-ui/core";
export const DropDownList = ({data, label, value, labelField, valueField, onChange, classes, ...others}) => {
return (
<FormControl
variant="outlined"
margin="normal"
>
<InputLabel className={classes.whiteBackground}>
{label}
</InputLabel>
<Select
native
value={value}
variant="outlined"
onChange={onChange}
{...others}
>
{data && data.map((item, index) => (
<option key={index} value={item[valueField || "value"]}>{item[labelField || "label"]}</option>
))}
</Select>
</FormControl>
);
}