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] Remove the onCellFocusOut prop #6302

Merged
merged 10 commits into from
Jan 12, 2023

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented Sep 27, 2022

Closes #6300

Changelog

Breaking changes

  • The onCellFocusOut prop was removed. Use componentsProps.cell.onBlur instead:
    <DataGrid
      componentsProps={{
        cell: {
          onBlur: (event) => {
            const cellElement = event.currentTarget;
            const field = cellElement.getAttribute('data-field');
            const rowId = cell.parentElement.getAttribute('data-id');
          },
        },
      }}
    />

@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! customization: logic Logic customizability enhancement This is not a bug, nor a new feature labels Sep 27, 2022
@mui-bot
Copy link

mui-bot commented Sep 27, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-6302--material-ui-x.netlify.app/

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 762.7 1,002.7 785 848.32 92.126
Sort 100k rows ms 635.4 1,171.9 635.4 946.76 184.517
Select 100k rows ms 203.1 294.4 230.8 245.34 37.252
Deselect 100k rows ms 159.9 296.7 197.5 210.74 47.373

Generated by 🚫 dangerJS against fc6f43d

Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

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

Nice catch 👌

@m4theushw
Copy link
Member

Since we decided to recommend to use componentsProps, could you change to remove onCellFocusOut? I added a demo in https://deploy-preview-6567--material-ui-x.netlify.app/x/react-data-grid/selection/#controlled-cell-selection implementing the Excel-like formula bar using cell selection.

@cherniavskii cherniavskii changed the title [DataGrid] Add onCellFocusIn prop [DataGrid] Remove onCellFocusOut prop Dec 23, 2022
@cherniavskii cherniavskii added breaking change v6.x and removed customization: logic Logic customizability enhancement This is not a bug, nor a new feature labels Dec 23, 2022
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 2, 2023
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 3, 2023
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 6, 2023
@github-actions

This comment was marked as outdated.

@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 Jan 6, 2023
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 12, 2023
@cherniavskii cherniavskii changed the title [DataGrid] Remove onCellFocusOut prop [DataGrid] Remove the onCellFocusOut prop Jan 12, 2023
@cherniavskii cherniavskii merged commit c80c638 into mui:next Jan 12, 2023
@cherniavskii cherniavskii deleted the onCellFocusIn-prop branch January 12, 2023 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: data grid This is the name of the generic UI component, not the React module! v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Remove onCellFocusOut and add documentation for alternative recommended approach.
4 participants