Fix tests after ts change
CI Pipeline / test (20) (pull_request) Successful in 2m41s
CI Pipeline / test (18) (pull_request) Successful in 3m21s
CI Pipeline / e2e (chromium) (pull_request) Failing after 1m25s
CI Pipeline / e2e (firefox) (pull_request) Failing after 1m24s
CI Pipeline / e2e (webkit) (pull_request) Failing after 1m24s
CI Pipeline / visual-regression (pull_request) Failing after 1m53s
CI Pipeline / performance (pull_request) Failing after 1m31s
CI Pipeline / lint (pull_request) Failing after 1m5s
CI Pipeline / storybook (pull_request) Successful in 1m36s
CI Pipeline / build (pull_request) Failing after 1m19s
CI Pipeline / test (20) (pull_request) Successful in 2m41s
CI Pipeline / test (18) (pull_request) Successful in 3m21s
CI Pipeline / e2e (chromium) (pull_request) Failing after 1m25s
CI Pipeline / e2e (firefox) (pull_request) Failing after 1m24s
CI Pipeline / e2e (webkit) (pull_request) Failing after 1m24s
CI Pipeline / visual-regression (pull_request) Failing after 1m53s
CI Pipeline / performance (pull_request) Failing after 1m31s
CI Pipeline / lint (pull_request) Failing after 1m5s
CI Pipeline / storybook (pull_request) Successful in 1m36s
CI Pipeline / build (pull_request) Failing after 1m19s
This commit is contained in:
@@ -51,7 +51,7 @@ const Select = forwardRef<HTMLButtonElement, SelectProps>(
|
||||
options,
|
||||
...props
|
||||
},
|
||||
ref
|
||||
ref,
|
||||
) => {
|
||||
const generatedId = useId();
|
||||
const selectId = id || `select-${generatedId}`;
|
||||
@@ -94,7 +94,7 @@ const Select = forwardRef<HTMLButtonElement, SelectProps>(
|
||||
selectRef.current.focus();
|
||||
}
|
||||
},
|
||||
[onChange]
|
||||
[onChange],
|
||||
);
|
||||
|
||||
// Handle select button click
|
||||
@@ -116,7 +116,7 @@ const Select = forwardRef<HTMLButtonElement, SelectProps>(
|
||||
setIsOpen(false);
|
||||
}
|
||||
},
|
||||
[disabled, isOpen]
|
||||
[disabled, isOpen],
|
||||
);
|
||||
|
||||
const getSizeStyles = (): string => {
|
||||
@@ -253,7 +253,7 @@ const Select = forwardRef<HTMLButtonElement, SelectProps>(
|
||||
// Handle options prop
|
||||
if (options && Array.isArray(options)) {
|
||||
const selectedOption = options.find(
|
||||
(option) => option.value === selectedValue
|
||||
(option) => option.value === selectedValue,
|
||||
);
|
||||
return selectedOption ? selectedOption.label : placeholder;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ const Select = forwardRef<HTMLButtonElement, SelectProps>(
|
||||
// Handle children (option elements)
|
||||
const selectedOption = React.Children.toArray(children).find(
|
||||
(child) =>
|
||||
React.isValidElement(child) && child.props.value === selectedValue
|
||||
React.isValidElement(child) && child.props.value === selectedValue,
|
||||
) as
|
||||
| React.ReactElement<{ value: string; children: React.ReactNode }>
|
||||
| undefined;
|
||||
@@ -353,7 +353,7 @@ const Select = forwardRef<HTMLButtonElement, SelectProps>(
|
||||
onClick={() =>
|
||||
handleOptionSelect(
|
||||
optionProps.value,
|
||||
String(optionProps.children)
|
||||
String(optionProps.children),
|
||||
)
|
||||
}
|
||||
>
|
||||
@@ -369,7 +369,7 @@ const Select = forwardRef<HTMLButtonElement, SelectProps>(
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Select.displayName = "Select";
|
||||
|
||||
Reference in New Issue
Block a user