CEC-5436: add configure component (#491)
* CEC-5436: add configure component * fix deps * linter * remove console log * remove logging
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { FormControl, InputLabel, Select } from "@material-ui/core";
|
||||
|
||||
export const DropDownList = ({data, label, value, labelField, valueField, onChange, classes, ...others}) => {
|
||||
export const DropDownList = ({ data, label, value, labelField, valueField, onChange, classes, fullWidth, ...others }) => {
|
||||
return (
|
||||
<FormControl
|
||||
variant="outlined"
|
||||
margin="normal"
|
||||
fullWidth={fullWidth}
|
||||
>
|
||||
<InputLabel className={classes.whiteBackground}>
|
||||
{label}
|
||||
@@ -16,9 +17,9 @@ export const DropDownList = ({data, label, value, labelField, valueField, onChan
|
||||
onChange={onChange}
|
||||
{...others}
|
||||
>
|
||||
{data && data.map((item, index) => (
|
||||
<option key={index} value={item[valueField || "value"]}>{item[labelField || "label"]}</option>
|
||||
))}
|
||||
{data && data.map((item, index) => (
|
||||
<option key={index} value={item[valueField || "value"]}>{item[labelField || "label"]}</option>
|
||||
))}
|
||||
</Select>
|
||||
</FormControl>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user