From 0c1ec5a88a6c6a5003aab29560250818ab01855b Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 3 Mar 2023 21:06:07 -0500 Subject: [PATCH] fix(striker-ui): expose blur and focus event handler slots in SelectWithLabel --- striker-ui/components/SelectWithLabel.tsx | 4 ++++ striker-ui/types/SelectWithLabel.d.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/striker-ui/components/SelectWithLabel.tsx b/striker-ui/components/SelectWithLabel.tsx index 8a7d63e2..fabac9d8 100644 --- a/striker-ui/components/SelectWithLabel.tsx +++ b/striker-ui/components/SelectWithLabel.tsx @@ -23,7 +23,9 @@ const SelectWithLabel: FC = ({ isReadOnly = false, messageBoxProps = {}, name, + onBlur, onChange, + onFocus, required: isRequired, selectProps: { multiple: selectMultiple, @@ -110,7 +112,9 @@ const SelectWithLabel: FC = ({ input={inputElement} multiple={selectMultiple} name={name} + onBlur={onBlur} onChange={onChange} + onFocus={onFocus} readOnly={isReadOnly} value={selectValue} {...restSelectProps} diff --git a/striker-ui/types/SelectWithLabel.d.ts b/striker-ui/types/SelectWithLabel.d.ts index d799a1b5..5d020eb5 100644 --- a/striker-ui/types/SelectWithLabel.d.ts +++ b/striker-ui/types/SelectWithLabel.d.ts @@ -25,7 +25,7 @@ type SelectWithLabelOptionalProps = { }; type SelectWithLabelProps = SelectWithLabelOptionalProps & - Pick & { + Pick & { id: string; selectItems: Array; };