Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid JS Table reloads unexpectedly. #1474

Open
npc2kor opened this issue Aug 29, 2024 · 0 comments
Open

Grid JS Table reloads unexpectedly. #1474

npc2kor opened this issue Aug 29, 2024 · 0 comments

Comments

@npc2kor
Copy link

npc2kor commented Aug 29, 2024

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:

  1. Open the app url - https://redacted-app-url/data-catalog
  2. The page loads and the GridJS table is rendered.
  3. In the search bar, the user types in the search keyword
  4. 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.
  5. 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]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant