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

main
Tsu-ba-me 2 years ago committed by digimer
parent 36f9938767
commit 0c1ec5a88a
  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, isReadOnly = false,
messageBoxProps = {}, messageBoxProps = {},
name, name,
onBlur,
onChange, onChange,
onFocus,
required: isRequired, required: isRequired,
selectProps: { selectProps: {
multiple: selectMultiple, multiple: selectMultiple,
@ -110,7 +112,9 @@ const SelectWithLabel: FC<SelectWithLabelProps> = ({
input={inputElement} input={inputElement}
multiple={selectMultiple} multiple={selectMultiple}
name={name} name={name}
onBlur={onBlur}
onChange={onChange} onChange={onChange}
onFocus={onFocus}
readOnly={isReadOnly} readOnly={isReadOnly}
value={selectValue} value={selectValue}
{...restSelectProps} {...restSelectProps}

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

Loading…
Cancel
Save