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

[BUG][Discover] Discover table panel won't adjust the size automatically when time range changes #5440

Closed
ananzh opened this issue Nov 7, 2023 · 1 comment
Assignees
Labels
bug Something isn't working discover for discover reinvent v2.12.0

Comments

@ananzh
Copy link
Member

ananzh commented Nov 7, 2023

Describe the bug
When change time range, discover table panel won't adjust the size automatically. Only refresh will work.

Screenshot 2023-11-07 at 09 00 27
discover-display-bug.mov

OpenSearch Version
2.10, 2.11 and main

Dashboards Version
2.10, 2.11 and main

Plugins

@ananzh ananzh added bug Something isn't working untriaged and removed untriaged labels Nov 7, 2023
@ananzh ananzh self-assigned this Nov 7, 2023
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Nov 7, 2023
…Dashboard

* Add React.memo on parent comp
* Restore embeddable panel style

Issue Resolve
opensearch-project#5440
opensearch-project#5415

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Nov 7, 2023
…Dashboard

* Add React.memo on parent comp
* Restore embeddable panel style

Issue Resolve
opensearch-project#5440
opensearch-project#5415

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Nov 7, 2023
…Dashboard

* Add React.memo on parent comp
* Restore embeddable panel style

Issue Resolve
opensearch-project#5440
opensearch-project#5415

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Nov 7, 2023
…Dashboard

* Add React.memo on parent comp
* Restore embeddable panel style

Issue Resolve
opensearch-project#5440
opensearch-project#5415

Signed-off-by: ananzh <ananzh@amazon.com>
@ananzh ananzh added discover for discover reinvent v2.11.1 Issues targeting release v2.11.1 and removed untriaged labels Nov 7, 2023
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Nov 8, 2023
…Dashboard

* Add React.memo on parent comp
* Restore embeddable panel style

Issue Resolve
opensearch-project#5415
opensearch-project#5440

Signed-off-by: ananzh <ananzh@amazon.com>
@ananzh ananzh added v2.12.0 and removed v2.11.1 Issues targeting release v2.11.1 labels Nov 10, 2023
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Jan 29, 2024
Auto-resized issue is caused by we have a central discover context created useSearch.
When it is updated, both panel and canvas which use useDiscoverContext will render.
The update on panel will trigger useSearch and cause canvas render before update is done.

* use reload to resolve table auto adjust issue
* clean out panel to have single useDiscoverContext

Issue Resolved:
opensearch-project#5440

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Jan 29, 2024
Auto-resized issue is caused by we have a central discover context created useSearch.
When it is updated, both panel and canvas which use useDiscoverContext will render.
The update on panel will trigger useSearch and cause canvas render before update is done.

* use reload to resolve table auto adjust issue
* clean out panel to have single useDiscoverContext

Issue Resolved:
opensearch-project#5440

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Feb 5, 2024
* Provide a unique key prop to the table component to force it to fully
re-render when the key changes, which will force table to adjust its size.

Issue Resolved
opensearch-project#5440

Signed-off-by: Anan Z <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Feb 5, 2024
* Provide a unique key prop to the table component to force it to fully
re-render when the key changes, which will force table to adjust its size.

Issue Resolved
opensearch-project#5440

Signed-off-by: Anan Z <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Feb 5, 2024
* Provide a unique key prop to the table component to force it to fully
re-render when the key changes, which will force table to adjust its size.

Issue Resolved
opensearch-project#5440

Signed-off-by: Anan Z <ananzh@amazon.com>
@ananzh
Copy link
Member Author

ananzh commented Feb 7, 2024

Bug is fixed in 2.12. Close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discover for discover reinvent v2.12.0
Projects
None yet
Development

No branches or pull requests

1 participant