@linzjs/step-ag-grid 2.4.10 → 2.4.11

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.
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import { KeyboardEvent } from "react";
2
2
  import "../../styles/GridFormSubComponentTextInput.scss";
3
3
  export interface GridFormSubComponentTextInput {
4
4
  setValue: (value: string) => void;
5
- keyDown: (key: string) => void;
5
+ keyDown: (key: string, event: KeyboardEvent<HTMLInputElement>) => void;
6
6
  placeholder?: string;
7
7
  className?: string;
8
8
  customHelpText?: string;
@@ -3087,12 +3087,14 @@ var GridFormDropDown = function (_props) {
3087
3087
  }
3088
3088
  setSubComponentValues(localSubComponentValues);
3089
3089
  },
3090
- keyDown: function (key) {
3090
+ keyDown: function (key, event) {
3091
3091
  var subComponentItem = subComponentValues.find(function (_a) {
3092
3092
  var optionValue = _a.optionValue;
3093
3093
  return optionValue === item.value;
3094
3094
  });
3095
3095
  if ((key === "Enter" || key === "Tab") && subComponentItem) {
3096
+ event.preventDefault();
3097
+ event.stopPropagation();
3096
3098
  return selectItemHandler(item.value, subComponentItem.subComponentValue).then(function () {
3097
3099
  ref.closeMenu();
3098
3100
  return true;
@@ -3751,7 +3753,9 @@ var GridFormSubComponentTextInput = function (_a) {
3751
3753
  setValue(value);
3752
3754
  setInputValue(value);
3753
3755
  }, inputProps: {
3754
- onKeyDown: function (k) { return keyDown(k.key); },
3756
+ onKeyDown: function (e) {
3757
+ return keyDown(e.key, e);
3758
+ },
3755
3759
  placeholder: placeholderText,
3756
3760
  onMouseEnter: function (e) {
3757
3761
  if (document.activeElement != e.currentTarget) {