Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[data grid] Fix typo on the rowSelectionPropagation feature #14907

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Oct 10, 2024

Noticed those while working on #14899

Other proposed change

I'm also not a fan of having that many flat params on findRowsToSelect and findRowsToDeselect.
I feel like it would be a lot more readable:

  1. Passing props.rowSelectionPropagation to the function (right now if you are searching the codebase, this concept can be named rowSelectionPropagation.descendants or autoSelectDescendants depending on where you are looking for)
  2. Moving to an object (it's subjective, but for this method I think the perf overhead is negligible, feel free to ignore this one)
findRowsToSelect({
    apiRef,
    tree,
    id,
    rowSelectionPropagation,
    addRow,
});

@flaviendelangle flaviendelangle self-assigned this Oct 10, 2024
@flaviendelangle flaviendelangle added the component: data grid This is the name of the generic UI component, not the React module! label Oct 10, 2024
@flaviendelangle flaviendelangle marked this pull request as ready for review October 10, 2024 07:16
@flaviendelangle flaviendelangle changed the title [data grid] Fix typo on the rowSelecctionPropagation feature [data grid] Fix typo on the rowSelectionPropagation feature Oct 10, 2024
@mui-bot
Copy link

mui-bot commented Oct 10, 2024

Copy link
Member

@MBilalShafi MBilalShafi left a comment

Choose a reason for hiding this comment

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

Thank you 💙

Nitpick: Suggested an alternate grammatical sense since I've seen the usage of 'will' to be discouraged. Feel free to drop the suggestions.

Regarding the other suggestions, totally agree on the first one, will handle in a follow-up PR.
On the second one, we lately started to follow more and more the pattern of passing arguments rather than an options object. But I'm fine with moving to the object pattern in this specific case if there's a clear win.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants