resolved react errors

This commit is contained in:
shams mosowi
2019-10-03 07:54:26 +10:00
parent d41d98f8ed
commit 070f8abe5e
3 changed files with 7 additions and 3 deletions

View File

@@ -75,6 +75,7 @@ const DocSelect = (props: Props) => {
{value &&
value.map((doc: any, index: number) => (
<Chip
key={doc.docPath}
label={config.primaryKeys.map(
(key: any) => `${doc.snapshot[key]} `
)}

View File

@@ -77,7 +77,6 @@ const MultiSelect = (props: Props) => {
className={classes.select}
multiple
value={value ? value : []}
defaultValue={[]}
onChange={handleChange}
input={<Input id="select-multiple-chip" />}
renderValue={selected => (

View File

@@ -63,7 +63,7 @@ export const isFieldType = (fieldType: any) => {
export const FieldsDropDown = (value: FieldType | null, onChange: any) => {
return (
<Select
value={value}
value={value ? value : ""}
onChange={onChange}
inputProps={{
name: "type",
@@ -73,7 +73,11 @@ export const FieldsDropDown = (value: FieldType | null, onChange: any) => {
{FIELDS.map(
(field: { icon: JSX.Element; name: string; type: FieldType }) => {
return (
<MenuItem id={`select-field-${field.type}`} value={field.type}>
<MenuItem
key={`select-field-${field.name}`}
id={`select-field-${field.type}`}
value={field.type}
>
<>{field.name}</>
</MenuItem>
);