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

[EuiDataGrid] Removing a row while a popover is open, opens a popover for another row #2625

Closed
Tracked by #85965
myasonik opened this issue Dec 10, 2019 · 5 comments · Fixed by #5590
Closed
Tracked by #85965

Comments

@myasonik
Copy link
Contributor

If I remove a row from an action in a details popover of a cell, I expect that popover to close and not reopen for the new row at that spot.

Example:
Kapture 2019-12-10 at 16 05 05

@myasonik
Copy link
Contributor Author

This would improve the UX for Discover's DataGrid reimplementation (elastic/kibana#51531)

@cchaos cchaos changed the title Removing a row while a popover is open, opens a popover for another row [EuiDataGrid] Removing a row while a popover is open, opens a popover for another row Sep 20, 2020
@sulemanof
Copy link
Contributor

I suppose this could be closed in favor of #4346
Passing closePopover prop explicitly into consuming application makes the popover closable when needed.

Note: I don't think it's currently possible to close it automatically when underlying data changes, since a cell is just an item with dimensions rowIndex & columnIndex. The data grid cell doesn't know which data it presents since it's the renderCellValue business.

@chandlerprall
Copy link
Contributor

As Daniil said, EuiDataGrid is unaware of what a change means or represents. We hit this same issue with EuiInMemoryTable as well: when does a change in data represent a different data set.

I think the path forward here is to expose a resetState method on the grid's ref, perhaps with a configuration option so e.g. pagination could reset or be left unmodified.

@cee-chen
Copy link
Contributor

Is this issue still valid now that #4346 has effectively solved the problem for Discover? Or can it be closed?

@cee-chen
Copy link
Contributor

cee-chen commented Feb 2, 2022

This is definitively closed by #5590 since exposing the closeCellPopover API allows consuming applications to manually close a popover when a row is deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants