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 <DatagridConfigurable> inspector hides the wrong column when using empty children #8929

Merged
merged 1 commit into from
May 22, 2023

Conversation

fzaninotto
Copy link
Member

Closes #8927

: null
).filter(column => column != null);
const columns = React.Children.toArray(props.children)
.filter(child => React.isValidElement(child))
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 basically made the filter before the map, so that we don't remove columns (which would break the indexing), but instead never create the columns for invalid children.

@djhi djhi added this to the 4.10.4 milestone May 22, 2023
@djhi djhi merged commit 2a71a6b into master May 22, 2023
@djhi djhi deleted the fix-datagrid-configurable-empty-child branch May 22, 2023 07:41
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.

conditionally visible column disappears from DatagridConfigurable and column visibility switcher is bugged
2 participants