Skip to content

Commit

Permalink
chore: update type signature for ts 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelgerber committed Sep 18, 2024
1 parent 819a4bc commit eab91db
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions explorer/ExplorerControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ interface ExplorerDropdownOption {
value: string
}

const ExplorerSingleValue = (props: SingleValueProps) => {
const ExplorerSingleValue = (
props: SingleValueProps<ExplorerDropdownOption>
) => {
if (props.selectProps.isSearchable && props.selectProps.menuIsOpen)
return (
<components.SingleValue {...props}>
Expand All @@ -79,7 +81,7 @@ const ExplorerDropdown = (props: {
const styles = getStylesForTargetHeight(30)

return (
<Select
<Select<ExplorerDropdownOption>
className={EXPLORER_DROPDOWN_CLASS}
classNamePrefix={EXPLORER_DROPDOWN_CLASS}
isDisabled={options.length < 2}
Expand All @@ -88,9 +90,9 @@ const ExplorerDropdown = (props: {
menuPosition="absolute"
options={options}
value={value}
onChange={(option: ExplorerDropdownOption) =>
onChange(option.value)
}
onChange={(option: ExplorerDropdownOption | null) => {
if (option) onChange(option.value)
}}
components={{
IndicatorSeparator: null,
SingleValue: ExplorerSingleValue,
Expand Down

0 comments on commit eab91db

Please sign in to comment.