Skip to content

Data Grid: How to calculate max ItemsPerpage? #3122

Answered by hml-coder
DomenicoFormoso asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the feedback. Some parent elements of the component needed height specified in IssueTest.razor (demo-section-content, fluent-tabs, fluent-tab-panel and demo-section-example) so I added them to the styles section of this sample.

Noticed that the resize event didn't handle browser restore/maximize actions so switched to ResizeObserver.

Added visualViewport.height detection for better accuracy on mobile browsers.

Maybe the datagrid should snap to size when hitting a smaller break point if possible. It appears as though it's animating to size but I'm thinking there might be a lot of layout recalculations happening. A debounce would fix it but not ideal.


@using FluentUI.Demo.Shared…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
1 reply
@DomenicoFormoso
Comment options

Comment options

You must be logged in to vote
10 replies
@vnbaaij
Comment options

@hml-coder
Comment options

Answer selected by vnbaaij
@vnbaaij
Comment options

@rpodevns
Comment options

@vnbaaij
Comment options

@rpodevns
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants