Fix: add event handler for refresh on table#16400
Open
parthy007 wants to merge 1 commit into
Open
Conversation
❌ Deploy Preview for storybook-tooljet failed.
|
Contributor
There was a problem hiding this comment.
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
onRefreshto 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue