fix(striker-ui): expose blur and focus event handler slots in SelectWithLabel

main
Tsu-ba-me 2 years ago
parent 92f2c3626c
commit 10126a5a95
  1. 4
      striker-ui/components/SelectWithLabel.tsx
  2. 2
      striker-ui/types/SelectWithLabel.d.ts

@ -23,7 +23,9 @@ const SelectWithLabel: FC<SelectWithLabelProps> = ({
isReadOnly = false,
messageBoxProps = {},
name,
onBlur,
onChange,
onFocus,
required: isRequired,
selectProps: {
multiple: selectMultiple,
@ -110,7 +112,9 @@ const SelectWithLabel: FC<SelectWithLabelProps> = ({
input={inputElement}
multiple={selectMultiple}
name={name}
onBlur={onBlur}
onChange={onChange}
onFocus={onFocus}
readOnly={isReadOnly}
value={selectValue}
{...restSelectProps}

@ -25,7 +25,7 @@ type SelectWithLabelOptionalProps = {
};
type SelectWithLabelProps = SelectWithLabelOptionalProps &
Pick<SelectProps, 'name' | 'onChange' | 'value'> & {
Pick<SelectProps, 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'value'> & {
id: string;
selectItems: Array<SelectItem | string>;
};

Loading…
Cancel
Save