[Data Grid Reactive] [DataGrid Reactive] Data feed does not reflected on the Grid
Question
data-grid-reactive
Forge component by Platform Maintenace
Application Type
Reactive

Hello

I notice that if I change my Data (JSON) the changes are not reflected on the Grid.
Example, I have a JSON with a list of attributes (Id, Title, Name, CreatedAt). At first I feed this to the Data of the DataGrid and I get the expected result.
But on my use case I can choose which field I want to fetch from the DB, and after the initial render, If I change my selection and instead of showing columns Id, Title, Name, Created At, I choose to show only Name.
In this case the table still shows the initial 4 columns but only Name has values.

Is there a way to re-render the columns with the new Data without putting the Grid behind an If?

Thanks

Leo

Solution

Hello @Leopoldo Ismael 

If you are using Autogenerated Columns we are not supporting changing the columns "on the fly" if you change the data source.

In order for the grid to work as defined, if you change the data source then you should reload the data grid.

Thanks,

Bruno Martinho

Thanks for the clarification

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.