Skip to content
Snippets Groups Projects
Unverified Commit e36de071 authored by Ryan Laurie's avatar Ryan Laurie Committed by GitHub
Browse files

Allow Chevron click on select button (#23343)

* allow chevron click
parent cfbd4fe9
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ export interface SelectButtonProps
disabled?: boolean;
fullWidth?: boolean;
highlighted?: boolean;
onClick?: () => void;
onClear?: () => void;
dataTestId?: string;
}
......@@ -35,6 +36,7 @@ const SelectButton = forwardRef(function SelectButton(
disabled = false,
fullWidth = true,
highlighted = false,
onClick,
onClear,
dataTestId,
...rest
......@@ -70,6 +72,7 @@ const SelectButton = forwardRef(function SelectButton(
disabled={disabled}
highlighted={highlighted}
fullWidth={fullWidth}
onClick={onClick}
{...rest}
>
{React.isValidElement(left) && left}
......@@ -81,7 +84,7 @@ const SelectButton = forwardRef(function SelectButton(
size={12}
hasValue={hasValue}
highlighted={highlighted}
onClick={onClear ? handleClear : undefined}
onClick={rightIcon === "close" ? handleClear : undefined}
/>
</SelectButtonRoot>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment