Skip to content

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

Closed

Description

@myasonik

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

Activity

  1. myasonik commented on Dec 10, 2019

    @myasonik
    ContributorAuthor

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

  2. 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[/+] on Sep 20, 2020
  3. sulemanof commented on Dec 9, 2020

    @sulemanof
    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.

  4. chandlerprall commented on Dec 10, 2020

    @chandlerprall
    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.

  5. cee-chen commented on Sep 28, 2021

    @cee-chen
    Contributor

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

  6. cee-chen commented on Feb 2, 2022

    @cee-chen
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions