Updating `resultsPerPage` prop doesn't update table without external data
See original GitHub issueIf I create a Griddle component that doesn’t use external data, and pass in a value for the resultsPerPage prop, the Griddle component renders as expected with the specified number of results per page. However, if I then update the value of that prop, the number of results per page in the Griddle component doesn’t change. I’ve tried using React.cloneElement to clone the Griddle component every time my container re-renders, but there’s no change. Anyone have a fix or workaround?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Component doesn't Update on Props Change - Stack Overflow
So when you rerender and pass in a new defaultValue, that value is ignored. If you need to change the value externally, then...
Read more >Search: list | YouTube Data API - Google Developers
Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies...
Read more >Paging through table data | BigQuery - Google Cloud
Shows how to page through the table data and query results using the BigQuery REST API with examples in C#, Java, Go, Python,...
Read more >Create and update an external data column in a list or library
Learn how to create, update, and refresh an external data column in a list ... have access to the data and that the...
Read more >AI Search reference - Product Documentation | ServiceNow
These reference topics provide additional information about AI Search installed components, system properties, features, and forms.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@giantyellowrobot btw- you can just give a new unique key prop to a component and that will force the component to unmount/remount
@giantyellowrobot Instead of unmounting and remounting, I use the custom
externalSetPageSize={yourSetPageSizeFunc}when creating my Griddle table. Then whenever the page size is changedyourSetPageSizeFunc(newPageSize)will be called.Within
yourSetPageSizeFuncI make an API call for my data using the newPageSize.I keep track of the table size in my Redux store and updated that as well.