Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/reference/generated/autocomplete-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
"detailedType": "boolean | undefined"
},
"mode": {
"type": "'none' | 'list' | 'both' | 'inline'",
"type": "'none' | 'list' | 'inline' | 'both'",
"default": "'list'",
"description": "Controls how the autocomplete behaves with respect to list filtering and inline autocompletion.\n- `list` (default): items are dynamically filtered based on the input value. The input value does not change based on the active item.\n- `both`: items are dynamically filtered based on the input value, which will temporarily change based on the active item (inline autocompletion).\n- `inline`: items are static (not filtered), and the input value will temporarily change based on the active item (inline autocompletion).\n- `none`: items are static (not filtered), and the input value will not change based on the active item.",
"detailedType": "'none' | 'list' | 'both' | 'inline' | undefined"
"detailedType": "'none' | 'list' | 'inline' | 'both' | undefined"
},
"onItemHighlighted": {
"type": "((highlightedValue: any | undefined, eventDetails: Autocomplete.Root.HighlightEventDetails) => void) | ((highlightedValue: ItemValue | undefined, eventDetails: Autocomplete.Root.HighlightEventDetails) => void)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { describeConformance, createRenderer, isJSDOM } from '#test-utils';

const Trigger = React.forwardRef(function Trigger(
props: Menu.Trigger.Props,
ref: React.ForwardedRef<HTMLDivElement>,
ref: React.ForwardedRef<any>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Can we use Element instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an error at ref otherwise; HTMLElement/Element both don't work as it expects HTMLButtonElement.

React 19 works fine though without forwardRef

) {
return <Menu.Trigger {...props} ref={ref} render={<div />} />;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createRenderer, describeConformance, isJSDOM } from '#test-utils';

const Trigger = React.forwardRef(function Trigger(
props: Popover.Trigger.Props,
ref: React.ForwardedRef<HTMLDivElement>,
ref: React.ForwardedRef<any>,
) {
return <Popover.Trigger {...props} ref={ref} render={<div />} />;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createRenderer, describeConformance, isJSDOM } from '#test-utils';

const Trigger = React.forwardRef(function Trigger(
props: Tooltip.Trigger.Props,
ref: React.ForwardedRef<HTMLDivElement>,
ref: React.ForwardedRef<any>,
) {
return <Tooltip.Trigger {...props} ref={ref} render={<div />} />;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export type BaseUIComponentProps<
State,
RenderFunctionProps = HTMLProps,
> = Omit<
WithBaseUIEvent<React.ComponentPropsWithoutRef<ElementType>>,
WithBaseUIEvent<React.ComponentPropsWithRef<ElementType>>,
'className' | 'color' | 'defaultValue' | 'defaultChecked'
> & {
/**
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/api-docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"es-toolkit": "^1.42.0",
"rimraf": "^6.1.2",
"tsx": "^4.21.0",
"typescript-api-extractor": "1.0.0-alpha.9",
"typescript-api-extractor": "1.0.0-alpha.10",
"yargs": "^18.0.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test/public-types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const SimpleAutocomplete = React.forwardRef<HTMLInputElement, SimpleAutoc
},
);

export const SimpleMenu = React.forwardRef<HTMLDivElement, SimpleMenuProps>(function SimpleMenu(
export const SimpleMenu = React.forwardRef<HTMLButtonElement, SimpleMenuProps>(function SimpleMenu(
{ label = 'Menu', ...rest },
ref,
) {
Expand Down
Loading