@natoora-libs/core 0.2.26 → 0.2.27-dev-doug-2

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.
@@ -7,8 +7,9 @@ import {
7
7
  isDarkModeEnabled
8
8
  } from "../chunk-CKW5LT7K.js";
9
9
  import {
10
- getFlattenedFiltersLabels
11
- } from "../chunk-N3IUZVB7.js";
10
+ getFlattenedFiltersLabels,
11
+ getSelectOptionFromKeyPress
12
+ } from "../chunk-3UDYWCV6.js";
12
13
  import {
13
14
  __commonJS,
14
15
  __toESM
@@ -736,6 +737,20 @@ var SmartSelect = forwardRef(
736
737
  onChange(selectedOption);
737
738
  }
738
739
  };
740
+ const handleKeyDown = (event) => {
741
+ if (event.ctrlKey || event.altKey || event.metaKey) {
742
+ return;
743
+ }
744
+ const nextOption = getSelectOptionFromKeyPress({
745
+ key: event.key,
746
+ options: visibleOptions,
747
+ currentValue: value
748
+ });
749
+ if (nextOption) {
750
+ event.preventDefault();
751
+ onChange(nextOption);
752
+ }
753
+ };
739
754
  const renderMenuContent = () => {
740
755
  if (isFetching) {
741
756
  return [
@@ -808,6 +823,7 @@ var SmartSelect = forwardRef(
808
823
  value: value ?? "",
809
824
  onChange: handleChange,
810
825
  onOpen: handleOpen,
826
+ onKeyDown: handleKeyDown,
811
827
  label: inputLabel,
812
828
  MenuProps: menuProps,
813
829
  children: renderMenuContent()
@@ -1389,7 +1405,7 @@ import {
1389
1405
  Typography as Typography6
1390
1406
  } from "@mui/material";
1391
1407
 
1392
- // src/utils/resolveObjectType.ts
1408
+ // src/utils/resolveObjectType/resolveObjectType.ts
1393
1409
  var resolveObjectType = (object, fieldName) => {
1394
1410
  if (!object || typeof object !== "object") {
1395
1411
  return object;