AnalyticalTable first row selected #4258
-
Hello, I am using a FlexibleColumnLayout component with the two columns layout and an AnalyticalTable on the first column. I'm trying to make the first row to be selected everytime I enter the application, and if the user select another row this row should be selected: I tried to do the following:
But this didn't work, the first row was not selected. It only worked when I used Do you have any suggestions on how can I do this? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
the issue you're describing can have multiple root causes, so to be able to help you please provide a reproducible example preferably by leveraging this codeSandbox template. |
Beta Was this translation helpful? Give feedback.
-
Hi @Lukas742, I created this code sandbox with an example, but it looks like it is working as expected there... I'll have to check my code to try to find the issue. |
Beta Was this translation helpful? Give feedback.
-
@Lukas742 I tried to reproduce it on codesandbox, but I couldn't. Do you think this issue could be related to multiple re-renders? |
Beta Was this translation helpful? Give feedback.
-
Normally the internal table state should be stable. Did you memoize your |
Beta Was this translation helpful? Give feedback.
-
Apparently this issue is being caused because our table data is being loaded after the table renders... |
Beta Was this translation helpful? Give feedback.
-
The AnalyticalTable resets its internal state when the data changes. You can find out how to prevent that in the "How to stop the table state from automatically resetting when the data changes?" Recipe. |
Beta Was this translation helpful? Give feedback.
The AnalyticalTable resets its internal state when the data changes. You can find out how to prevent that in the "How to stop the table state from automatically resetting when the data changes?" Recipe.