https://github.com/gartner/palustris-ra-react-select
An input-component for React-admin, for use inside a ReferenceArrayInput. Has the ability to create new entries.
https://github.com/gartner/palustris-ra-react-select
Last synced: 7 months ago
JSON representation
An input-component for React-admin, for use inside a ReferenceArrayInput. Has the ability to create new entries.
- Host: GitHub
- URL: https://github.com/gartner/palustris-ra-react-select
- Owner: gartner
- License: mit
- Created: 2019-12-18T06:08:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:17:01.000Z (over 3 years ago)
- Last Synced: 2024-12-18T06:19:20.921Z (over 1 year ago)
- Language: JavaScript
- Size: 631 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# palustris-ra-react-select
An input-component for React-admin, for use inside a ReferenceArrayInput. Has the ability to create new entries.
The component is based on [react-select](https://react-select.com/home).
The component will only work as expected if placed inside a ``-component
## Properties
__isCreatable__ *(bool)* If true, you can enter a value that is not present in the choices, and it will be created in the resource from which the choices are taken from.
__labelField__ *(string)* Name of the field that contains the label in choices. Defaults to 'label'.
__valueField__ *(string)* Name of the field that contains the value in choices. Defaults to 'id'.
## Notes
The material-ui theme used by react-admin has overflow: hidden, which in some cases will make some of the select-menu hidden, if the field is placed at the bottom of a form. This can be changed by customizing the theme:
```typescript jsx
import { createMuiTheme } from '@material-ui/core/styles';
const myTheme = createMuiTheme({
overrides: {
MuiCard: {
root: {
overflow: "overflow",
},
},
},
});
const App = () => (
);
```