Skip to content

Commit

Permalink
Remove unnecessary code from BasicEntityAutocompleteField
Browse files Browse the repository at this point in the history
  • Loading branch information
zackatbrightbeam committed Aug 2, 2024
1 parent 2a200ce commit 25358fe
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions src/lib/BasicEntityAutocompleteField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,46 +84,6 @@ function BasicEntityAutocompleteField (props: any) {
)
}

// function BasicEntityAutocompleteField (props: any) {
// const { spec } = props

// const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec)
// const { control, field, errors } = basicEntityAutocompleteField

// const err = errors[field.name]

// return (
// <Box key={`${field.id}-box`}>
// <Controller
// key={`${field.id}-controller`}
// name={field.name}
// control={control}
// defaultValue={resolveDefault(field.cat)}
// render={({ field: { onChange, value } }) => (
// <Autocomplete
// freeSolo
// forcePopupIcon
// multiple={field.cat.multiple !== 1}
// options={resolveCategories(field.cat)}
// isOptionEqualToValue={(opt: any, val: any) =>
// opt === val ||
// (opt?.id != null && val?.id != null && opt.id === val.id) ||
// (opt?.key != null && val?.key != null && opt.key === val.key)
// }
// getOptionLabel={(option: any) => option.title}
// value={resolveValue(value, field.cat)}
// disabled={!field.ux.edit}
// {...field.ux.props}
// onChange={(_, newVal: any) => onChange(newVal)}
// renderInput={(params: any) => <TextField {...params} label={field.label} />}
// />
// )}
// />
// <BasicEntityFieldError err={err} />
// </Box>
// )
// }

export function resolveCategories (cat: {
item: Record<string, { title: string }>
}) {
Expand Down

0 comments on commit 25358fe

Please sign in to comment.