react-admin-base-bootstrap 0.8.11 → 0.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,9 @@ function Option(props) {
20
20
  function SingleValue(props) {
21
21
  return jsx(components.SingleValue, Object.assign({}, props), (props.selectProps.children && props.selectProps.children(props.data)) || (props.data.__isNew__ ? jsx(FormattedMessage, { id: "CREATE_VALUE", values: { text: props.children } }) : props.children));
22
22
  }
23
+ function MultiValue(props) {
24
+ return jsx(components.MultiValue, Object.assign({}, props), (props.selectProps.children && props.selectProps.children(props.data)) || props.children);
25
+ }
23
26
  function EditOrAddIndicator(props) {
24
27
  const { className, cx, getStyles, innerProps, isMulti } = props;
25
28
  return (jsx("div", Object.assign({}, innerProps, { className: cx({
@@ -45,7 +48,7 @@ function MultiValueRemove(props) {
45
48
  jsx("i", { className: "fas fa-pencil", style: { fontSize: '.75em' } })),
46
49
  jsx(components.MultiValueRemove, Object.assign({}, props)));
47
50
  }
48
- const Components = { Option, SingleValue, IndicatorsContainer, MultiValueRemove };
51
+ const Components = { Option, SingleValue, MultiValue, IndicatorsContainer, MultiValueRemove };
49
52
  export default function ApiSelect(props) {
50
53
  const { disabled, url, getOptionLabel, getOptionValue, idKey, nameKey, filter, group, onCreateOption, getNewOptionData, isMulti, onChange, value, placeholder, staticOptions } = props;
51
54
  const intl = useIntl();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-admin-base-bootstrap",
3
- "version": "0.8.11",
3
+ "version": "0.8.12",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -24,6 +24,12 @@ function SingleValue(props) {
24
24
  </components.SingleValue>
25
25
  }
26
26
 
27
+ function MultiValue(props) {
28
+ return <components.MultiValue {...props}>
29
+ { (props.selectProps.children && props.selectProps.children(props.data)) || props.children }
30
+ </components.MultiValue>
31
+ }
32
+
27
33
  function EditOrAddIndicator(props) {
28
34
  const { className, cx, getStyles, innerProps, isMulti } = props;
29
35
  return (
@@ -66,7 +72,7 @@ function MultiValueRemove(props) {
66
72
  </Fragment>;
67
73
  }
68
74
 
69
- const Components = { Option, SingleValue, IndicatorsContainer, MultiValueRemove };
75
+ const Components = { Option, SingleValue, MultiValue, IndicatorsContainer, MultiValueRemove };
70
76
 
71
77
  export interface ApiSelectProps<Option = any> {
72
78
  url?: string;