Skip to content

Grid JS Table reloads unexpectedly. #1474

Open
@npc2kor

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:

  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]);

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions