@luscii-healthtech/web-ui 2.37.13 → 2.37.15

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.
@@ -9,7 +9,7 @@ import ReactDatePicker from 'react-datepicker';
9
9
  import moment from 'moment';
10
10
  import 'react-datepicker/dist/react-datepicker.css';
11
11
  import ClipboardJS from 'clipboard';
12
- import ReactSelect, { mergeStyles } from 'react-select';
12
+ import ReactSelect, { mergeStyles, components } from 'react-select';
13
13
  import groupBy from 'lodash-es/groupBy';
14
14
  import debounce from 'lodash.debounce';
15
15
  import ReactQuill from 'react-quill';
@@ -3781,7 +3781,26 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
3781
3781
  return value.includes(o.value);
3782
3782
  }) : flatmappedOptions.find(function (o) {
3783
3783
  return o.value === value;
3784
- });
3784
+ }); // Why: https://github.com/JedWatson/react-select/issues/3149
3785
+
3786
+ var getDataAttributes = function getDataAttributes() {
3787
+ var dataProps = {};
3788
+
3789
+ for (var prop in otherProps) {
3790
+ if (prop.includes("data-")) {
3791
+ dataProps[prop] = otherProps[prop];
3792
+ }
3793
+ }
3794
+
3795
+ return dataProps;
3796
+ };
3797
+
3798
+ var CustomContainer = function CustomContainer(commonProps) {
3799
+ return /*#__PURE__*/React__default.createElement(components.SelectContainer, _extends({}, commonProps, {
3800
+ innerProps: Object.assign({}, commonProps.innerProps, _extends({}, getDataAttributes()))
3801
+ }));
3802
+ };
3803
+
3785
3804
  return /*#__PURE__*/React__default.createElement(ReactSelect, _extends({}, otherProps, {
3786
3805
  ref: innerRef,
3787
3806
  styles: mergedStyles,
@@ -3795,7 +3814,10 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
3795
3814
  "w-56": width === "lg",
3796
3815
  "w-80": width === "xl",
3797
3816
  "flex-grow": width === "full"
3798
- })
3817
+ }),
3818
+ components: {
3819
+ SelectContainer: CustomContainer
3820
+ }
3799
3821
  }));
3800
3822
  });
3801
3823