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

fix: virtuoso list fixed height #5988

Merged
merged 1 commit into from
Nov 25, 2024
Merged

fix: virtuoso list fixed height #5988

merged 1 commit into from
Nov 25, 2024

Conversation

alter-eggo
Copy link
Contributor

@alter-eggo alter-eggo commented Nov 24, 2024

Try out Leather build 32007d4Extension build, Test report, Storybook, Chromatic

This pr fixes problems of fixed virtual scroller wrapper height, when we needed to calc it's height depending on header height

blocked by: leather-io/mono#649

Comment on lines 17 to 19
const onResize = () => {
setKey(Date.now());
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const onResize = () => {
setKey(Date.now());
};
function onResize() {
setKey(Date.now());
}

nit, but can you also explain why we need to update the key on resize? This seems like a bit of a hack? 🤔

Could useId be used here instead?

Copy link
Contributor Author

@alter-eggo alter-eggo Nov 25, 2024

Choose a reason for hiding this comment

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

I believe this is done for re-render virtual list on resize
I tested without this and worked ok, prob was done for removed logic work ok

so, removed this

@alter-eggo alter-eggo marked this pull request as ready for review November 25, 2024 09:23
@alter-eggo alter-eggo merged commit 6704ac5 into dev Nov 25, 2024
32 checks passed
@alter-eggo alter-eggo deleted the fix/switch-mb2 branch November 25, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants