Skip to content

Commit

Permalink
Merge pull request #3592 from marmelab/select-array-input-typescript
Browse files Browse the repository at this point in the history
[RFR] Migrate SelectArrayInput to TypeScript
  • Loading branch information
fzaninotto authored Aug 23, 2019
2 parents 769a179 + 0ea1306 commit 0c202c1
Show file tree
Hide file tree
Showing 6 changed files with 541 additions and 496 deletions.
7 changes: 6 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -784,4 +784,9 @@ const OrderEdit = (props) => (
</SimpleForm>
</Edit>
);
```
```

## helperText is handled the same way in all components

Some components (such as `<SelectArrayInput />`) accepted the `helperText` in their `meta` prop. They now receive it directly in their props.
Besides, all components now display their error or their helperText, but not both at the same time.
4 changes: 2 additions & 2 deletions packages/ra-ui-materialui/src/input/InputWithOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ type OptionTextFunction<ChoiceType = any> = (record: ChoiceType) => string;

export interface InputWithOptionsProps<ChoiceType = any> {
choices: ChoiceType[];
optionText:
optionText?:
| string
| OptionTextFunction<ChoiceType>
| ReactElement<{ record: ChoiceType }>;
optionValue: string;
optionValue?: string;
}
296 changes: 0 additions & 296 deletions packages/ra-ui-materialui/src/input/SelectArrayInput.js

This file was deleted.

Loading

0 comments on commit 0c202c1

Please sign in to comment.