SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
435 stars 97 forks source link

AnalyticalTable configuration is resetting when data is updated #5469

Closed adrianui5 closed 7 months ago

adrianui5 commented 7 months ago

Bug Description

Hi colleagues,

I am using the AnalyticalTable where you can sort for a column to be in alphabetical order. It is a tree table, which means that you can also expand/collapse certain items.

Due to different events (such as adding a new item to the list, or applying a search query), I would like to change the data that I am inputting into the AnalyticalTable. However, whenever the data changes, all items are collapsed (hence it resets the expanding), and the alphabetical ordering is also undone.

Is there a way how I can avoid this? I want to keep the configuration (expanded items, alphabetical sorting), even if the data changes slightly.

Affected Component

No response

Expected Behaviour

No response

Isolated Example

No response

Steps to Reproduce

1. 2. 3. ...

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

1.20.1

Browser

Chrome

Operating System

Windows

Additional Context

No response

Organization

No response

Declaration

Lukas742 commented 7 months ago

Thanks for reporting! I'll forward this issue to the UI5 Web Components for React repo as the affected component is developed there.

Lukas742 commented 7 months ago

Hi @adrianui5

please see this section of our documentation: https://sap.github.io/ui5-webcomponents-react/?path=/docs/data-display-analyticaltable-recipes--docs#how-to-stop-the-table-state-from-automatically-resetting-when-the-data-changes.

If setting autoResetXYZ: false doesn't work, please let us know.