Description
Describe the bug
We are using GridJS table on our application frontend to fetch and render data in the table, from the backend (API - /backend_data_eng/datacatalog/get_datacatalog_table). However we have seen a strange behavior that the Grid JS table, reloads/re-renders unexpectedly. This happens only once during the first time and never again, untill the page is refreshed/reloaded. The steps to reproduce has more details.
To Reproduce
Steps to reproduce the behavior:
- Open the app url - https://redacted-app-url/data-catalog
- The page loads and the GridJS table is rendered.
- In the search bar, the user types in the search keyword
- An API call is made towards the backend to filter the data based on the search keyword and searched data is rendered on the table.
- After a couple of seconds, the table refreshes again to render the unfiltered data.
Expected behavior
The table is not expected to reset/re-render without any changes in the search keyword input.
Screenshots
Attached
Desktop (please complete the following information):
- OS: Windows
- Browser [e.g. chrome, safari] - Chrome, Edge
- Version [e.g. 22] - Chrome Version 127.0.6533.100
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Here is the frontend code usage -
const [serverConfig, setServerConfig] = useState<any>(() => ({
url: `${process.env.NEXT_PUBLIC_APP_API_URL}/backend_data_eng/datacatalog/get_datacatalog_table?stage=curated}`,
}));
useEffect(() => {
setServerConfig({
url: `${process.env.NEXT_PUBLIC_APP_API_URL}/backend_data_eng/datacatalog/get_datacatalog_table?stage=${stage}`,
});
}, [stage]);