@datarobot/design-system 30.6.0 → 30.6.1

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.
@@ -127,10 +127,10 @@ function CheckboxOptionList({
127
127
  "test-id": "typeahead-dropdown-list",
128
128
  id: listId,
129
129
  ref: el => {
130
- // we have to search for parent container which is rendered by PopperDropdownWrapper
131
- // in typeahead component, because it is an actual scrollable container,
132
- // and we need it to correctly scroll to active option when navigating via arrow keys
133
- scrollableContainerRef.current = el?.parentElement ?? null;
130
+ // The element itself is the scrollable container (overflow-y: auto on
131
+ // .checkbox-multiselect-container); keyboard navigation needs the ref
132
+ // here so active options can be scrolled into view.
133
+ scrollableContainerRef.current = el;
134
134
  },
135
135
  children: visibleOptions.map(option => /*#__PURE__*/(0, _jsxRuntime.jsx)(CheckboxListItem, {
136
136
  option: option,
@@ -119,10 +119,10 @@ function CheckboxOptionList({
119
119
  "test-id": "typeahead-dropdown-list",
120
120
  id: listId,
121
121
  ref: el => {
122
- // we have to search for parent container which is rendered by PopperDropdownWrapper
123
- // in typeahead component, because it is an actual scrollable container,
124
- // and we need it to correctly scroll to active option when navigating via arrow keys
125
- scrollableContainerRef.current = el?.parentElement ?? null;
122
+ // The element itself is the scrollable container (overflow-y: auto on
123
+ // .checkbox-multiselect-container); keyboard navigation needs the ref
124
+ // here so active options can be scrolled into view.
125
+ scrollableContainerRef.current = el;
126
126
  },
127
127
  children: visibleOptions.map(option => /*#__PURE__*/_jsx(CheckboxListItem, {
128
128
  option: option,
@@ -88092,11 +88092,10 @@ function CheckboxOptionList(_ref2) {
88092
88092
  "test-id": "typeahead-dropdown-list",
88093
88093
  id: listId,
88094
88094
  ref: function ref(el) {
88095
- var _ref3;
88096
- // we have to search for parent container which is rendered by PopperDropdownWrapper
88097
- // in typeahead component, because it is an actual scrollable container,
88098
- // and we need it to correctly scroll to active option when navigating via arrow keys
88099
- scrollableContainerRef.current = (_ref3 = el === null || el === void 0 ? void 0 : el.parentElement) !== null && _ref3 !== void 0 ? _ref3 : null;
88095
+ // The element itself is the scrollable container (overflow-y: auto on
88096
+ // .checkbox-multiselect-container); keyboard navigation needs the ref
88097
+ // here so active options can be scrolled into view.
88098
+ scrollableContainerRef.current = el;
88100
88099
  }
88101
88100
  }, visibleOptions.map(function (option) {
88102
88101
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CheckboxListItem, {
@@ -88113,24 +88112,24 @@ function CheckboxOptionList(_ref2) {
88113
88112
  });
88114
88113
  }));
88115
88114
  }
88116
- function CheckboxMultiselectTypeahead(_ref4) {
88115
+ function CheckboxMultiselectTypeahead(_ref3) {
88117
88116
  var _items$map, _options$map;
88118
- var options = _ref4.options,
88119
- optionId = _ref4.optionId,
88120
- _ref4$optionLabel = _ref4.optionLabel,
88121
- optionLabel = _ref4$optionLabel === void 0 ? 'label' : _ref4$optionLabel,
88122
- _ref4$items = _ref4.items,
88123
- items = _ref4$items === void 0 ? [] : _ref4$items,
88124
- isDisabled = _ref4.isDisabled,
88125
- validity = _ref4.validity,
88126
- _ref4$onSelect = _ref4.onSelect,
88127
- onChange = _ref4$onSelect === void 0 ? function () {} : _ref4$onSelect,
88128
- selectAllRow = _ref4.selectAllRow,
88129
- _ref4$optionComponent = _ref4.optionComponent,
88130
- optionComponent = _ref4$optionComponent === void 0 ? null : _ref4$optionComponent,
88131
- _ref4$shouldShowValid = _ref4.shouldShowValidityOnTouched,
88132
- shouldShowValidityOnTouched = _ref4$shouldShowValid === void 0 ? false : _ref4$shouldShowValid,
88133
- otherMultiSelectTypeaheadProps = _objectWithoutProperties(_ref4, _excluded);
88117
+ var options = _ref3.options,
88118
+ optionId = _ref3.optionId,
88119
+ _ref3$optionLabel = _ref3.optionLabel,
88120
+ optionLabel = _ref3$optionLabel === void 0 ? 'label' : _ref3$optionLabel,
88121
+ _ref3$items = _ref3.items,
88122
+ items = _ref3$items === void 0 ? [] : _ref3$items,
88123
+ isDisabled = _ref3.isDisabled,
88124
+ validity = _ref3.validity,
88125
+ _ref3$onSelect = _ref3.onSelect,
88126
+ onChange = _ref3$onSelect === void 0 ? function () {} : _ref3$onSelect,
88127
+ selectAllRow = _ref3.selectAllRow,
88128
+ _ref3$optionComponent = _ref3.optionComponent,
88129
+ optionComponent = _ref3$optionComponent === void 0 ? null : _ref3$optionComponent,
88130
+ _ref3$shouldShowValid = _ref3.shouldShowValidityOnTouched,
88131
+ shouldShowValidityOnTouched = _ref3$shouldShowValid === void 0 ? false : _ref3$shouldShowValid,
88132
+ otherMultiSelectTypeaheadProps = _objectWithoutProperties(_ref3, _excluded);
88134
88133
  // multiselect typeahead does not use typeahead logic for rendering validity message,
88135
88134
  // but in its logic it does not do checks on whether input was touched or not
88136
88135
  // didn't want to introduce this to multiselect typeahead component cause not sure if it's needed there,