Skip to content

Commit

Permalink
fix: make ref in renderControl generic
Browse files Browse the repository at this point in the history
  • Loading branch information
ogonkov committed Feb 26, 2025
1 parent 81a3380 commit 9102fef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Select/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export type SelectRenderTriggerProps = AriaLabelingProps &
| 'disabled'
>;

export type SelectRenderControlProps = {
export type SelectRenderControlProps<T extends HTMLElement = HTMLElement> = {
onClear: () => void;
renderClear: (args: SelectRenderClearArgs) => React.ReactNode;
renderCounter: () => React.ReactNode;
ref: React.Ref<HTMLElement>;
ref: React.Ref<T>;
open: boolean;
disabled?: boolean;
triggerProps: SelectRenderTriggerProps;
Expand All @@ -39,8 +39,8 @@ export type SelectRenderControlProps = {
export type SelectRenderControlOptions = {
value: SelectProps['value'];
};
export type SelectRenderControl = (
props: SelectRenderControlProps,
export type SelectRenderControl<T extends HTMLElement = HTMLElement> = (
props: SelectRenderControlProps<T>,
options: SelectRenderControlOptions,
) => React.ReactElement;

Expand Down

0 comments on commit 9102fef

Please sign in to comment.