We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://mantine.dev/hooks/use-click-outside/#multiple-nodes
The following hook is documented as taking two null values as argument for the nodes parameter like so
null
nodes
const [dropdown, setDropdown] = useState(null); const [control, setControl] = useState(null); useClickOutside(() => console.log('outside'), null, [control, dropdown]);
but throws a TS due to being typed as an HTMLElement
HTMLElement
function useClickOutside<T extends HTMLElement = any>( handler: () => void, events?: string[] | null, nodes?: HTMLElement[] ): React.MutableRefObject<T>;
The documentation should reflect this or be typed to accept null as an argument by default until a ref to an element has been supplied.
Yes
The text was updated successfully, but these errors were encountered:
[@mantine/hooks] use-click-outside: Fix incorrect typescript definiti…
c485f9a
…on for strict mode (#3119)
Fixed in 5.9.4
Sorry, something went wrong.
No branches or pull requests
Link to the page where something nasty is located
https://mantine.dev/hooks/use-click-outside/#multiple-nodes
Exact quote of what is wrong
The following hook is documented as taking two
null
values as argument for thenodes
parameter like sobut throws a TS due to being typed as an
HTMLElement
The documentation should reflect this or be typed to accept
null
as an argument by default until a ref to an element has been supplied.Are you willing to create pull request with the fix?
Yes
The text was updated successfully, but these errors were encountered: