Skip to content
New issue

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

Error on useResizeObserver and Group #5780

Closed
1 of 2 tasks
israelins85 opened this issue Feb 16, 2024 · 5 comments
Closed
1 of 2 tasks

Error on useResizeObserver and Group #5780

israelins85 opened this issue Feb 16, 2024 · 5 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@israelins85
Copy link
Contributor

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.5.3

What package has an issue?

@mantine/core

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

None

Describe the bug

Type 'MutableRefObject<HTMLDivElement | undefined>' is not assignable to type 'Ref | undefined'.
Type 'MutableRefObject<HTMLDivElement | undefined>' is not assignable to type 'RefObject'.
Types of property 'current' are incompatible.
Type 'HTMLDivElement | undefined' is not assignable to type 'HTMLDivElement | null'.
Type 'undefined' is not assignable to type 'HTMLDivElement | null'.typescript(2322)

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-group-ref-error-kvx58y

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@israelins85
Copy link
Contributor Author

israelins85 commented Feb 16, 2024

Is wrong use only: const [refRightSection, rectRightSection] = useResizeObserver();

?

@pauledwards241
Copy link

I'm having a similar issue, looks to be caused by the fix to #5752

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Feb 26, 2024
@rtivital
Copy link
Member

Fixed in 7.6.1

@tobeycodes
Copy link

@rtivital I'm a little confused by this fix. Why are we now returning any?

error  Unsafe array destructuring of a tuple element with an `any` value  @typescript-eslint/no-unsafe-assignment
ui:lint:   
error  Unsafe member access .current on an `any` value                    @typescript-eslint/no-unsafe-member-access

@kenzaflow
Copy link

Same here: ec4fcf7#commitcomment-139346444

Unsafe assignment of an `any` value.eslint[@typescript-eslint/no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

5 participants