Skip to content

Fix: add event handler for refresh on table#16400

Open
parthy007 wants to merge 1 commit into
lts-3.16from
refactor/fire-refresh-events
Open

Fix: add event handler for refresh on table#16400
parthy007 wants to merge 1 commit into
lts-3.16from
refactor/fire-refresh-events

Conversation

@parthy007
Copy link
Copy Markdown
Collaborator

Copilot AI review requested due to automatic review settings May 13, 2026 10:01
@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for storybook-tooljet failed.

Name Link
🔨 Latest commit 3a933c5
🔍 Latest deploy log https://app.netlify.com/projects/storybook-tooljet/deploys/6a044bf60a1a4600088fa831

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new onRefresh event for the Table widget and wires it to the NewTable refresh control so apps can attach actions that run after a refresh is triggered/completed.

Changes:

  • Added onRefresh to the Table widget event definitions (server + frontend configs).
  • Triggered fireEvent('onRefresh') from the NewTable refresh hook (both when there are no dependent queries and after dependent queries settle).
  • Updated footer control button border styling for cleaner grouping.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/src/modules/apps/services/widget-config/table.js Adds onRefresh to the server-side Table widget event config.
frontend/src/AppBuilder/WidgetManager/widgets/table.js Adds onRefresh to the frontend Table widget event config (keeps server/frontend in sync).
frontend/src/AppBuilder/Widgets/NewTable/_hooks/useTableRefresh.js Fires onRefresh during table refresh flow and removes the “No queries to refresh” toast.
frontend/src/AppBuilder/Widgets/NewTable/_components/Footer/_components/ControlButtons.jsx Passes fireEvent into the refresh hook so refresh can emit onRefresh.
frontend/src/AppBuilder/_stores/slices/eventsSlice.js Allows onRefresh to execute configured actions via the events system.
frontend/src/_styles/table-component.scss Adjusts grouped footer button borders/radii.

Comment on lines +41 to +43
setIsRefreshing(id, true);
fireEvent('onRefresh');
setIsRefreshing(id, false);
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

Successfully merging this pull request may close these issues.

2 participants