JSPM

@palustris/ra-react-select

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q13980F
  • License MIT

A 'tagging' component for React-admin 3. To be used inside a <ReferenceArrayInput> and is capable of creating new 'tags'

Package Exports

  • @palustris/ra-react-select

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@palustris/ra-react-select) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.

The component will only work as expected if placed inside a <ReferenceArrayInput>-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:

import { createMuiTheme } from '@material-ui/core/styles';

const myTheme = createMuiTheme({
    overrides: {
        MuiCard: {
            root: {
                overflow: "overflow",
            },
        },
    },
});

const App = () => (
    <Admin theme={myTheme} dataProvider={}>
    </Admin>
);