mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
resolved react errors
This commit is contained in:
@@ -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]} `
|
||||
)}
|
||||
|
||||
@@ -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 => (
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user