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

[DataGrid] Enable the documentation of the portable state #4028

Merged
merged 36 commits into from
Mar 31, 2022

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Feb 24, 2022

@flaviendelangle flaviendelangle self-assigned this Feb 24, 2022
@flaviendelangle flaviendelangle changed the title [DataGrid] Add column order and dimensions to the portable state [DataGrid] Enable the documentation of the portable state Feb 24, 2022
@flaviendelangle flaviendelangle added docs Improvements or additions to the documentation on hold There is a blocker, we need to wait labels Feb 24, 2022
@mui-bot
Copy link

mui-bot commented Feb 24, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 238.2 414.9 316.7 328.7 70.288
Sort 100k rows ms 465.4 1,035.2 687.2 745.48 185.785
Select 100k rows ms 169.1 283.3 208.2 212.38 38.284
Deselect 100k rows ms 95 190.3 187.9 153.88 35.125

Generated by 🚫 dangerJS against 250690b

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 24, 2022
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Feb 25, 2022
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 14, 2022
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 18, 2022
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 18, 2022
{...data}
loading={loading}
initialState={savedState.initialState}
key={savedState.count}
Copy link
Member

Choose a reason for hiding this comment

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

Better to use a real prop.

Suggested change
key={savedState.count}
className={`grid-${savedState.count}`}

Side note: we should support the id prop.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is the initialState so we need to remount the grid whenever the state changes.
Just causing a re-render won't re-apply the initial state.

That's why I was unmounting / remounting the main grid before.


### Restore the state with `apiRef` [<span class="plan-pro"></span>](https://mui.com/store/items/material-ui-pro/)

{{"demo": "RestoreStateApiRef.js", "bg": "inline", "defaultCodeOpen": false}}
Copy link
Member

Choose a reason for hiding this comment

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

We miss a paragraph explaining how to interact with the demo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

{({ TransitionProps }) => (
<Fade {...TransitionProps} timeout={350}>
<Paper>
<List>
Copy link
Member

Choose a reason for hiding this comment

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

List is not accessible. When I open it I can't navigate through the items via keyboard. Menu handles that. MenuList can also be used. We use the last to be able to still use a Popper

Copy link
Member Author

Choose a reason for hiding this comment

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

I migrated to a MenuList

Copy link
Member

@m4theushw m4theushw left a comment

Choose a reason for hiding this comment

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

There're still some things to fix but you can merge it as soon as you're OK with it.

@flaviendelangle flaviendelangle merged commit 6dac829 into mui:master Mar 31, 2022
@flaviendelangle flaviendelangle deleted the state-import-export-doc branch March 31, 2022 09:32
alexfauquette pushed a commit to alexfauquette/mui-x that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] Add methods to save and restore the state
3 participants