Show notification when running row actions in the data section

This commit is contained in:
Andrew Kingston 2024-10-02 11:11:20 +01:00
parent dda078d743
commit a4c67f1812
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,7 @@
import { admin, themeStore } from "stores/portal"
import { Grid } from "@budibase/frontend-core"
import { API } from "api"
import { notifications } from "@budibase/bbui"
import GridCreateEditRowModal from "components/backend/DataTable/modals/grid/GridCreateEditRowModal.svelte"
import GridFilterButton from "components/backend/DataTable/buttons/grid/GridFilterButton.svelte"
import GridManageAccessButton from "components/backend/DataTable/buttons/grid/GridManageAccessButton.svelte"
@ -26,14 +27,12 @@
$: currentTheme = $themeStore?.theme
$: darkMode = !currentTheme.includes("light")
$: currentTheme = $themeStore?.theme
$: darkMode = !currentTheme.includes("light")
const makeRowActionButtons = actions => {
return (actions || []).map(action => ({
text: action.name,
onClick: async row => {
await rowActions.trigger(id, action.id, row._id)
notifications.success("Row action triggered successfully")
},
}))
}

View File

@ -1,5 +1,5 @@
<script>
import { Banner } from "@budibase/bbui"
import { Banner, notifications } from "@budibase/bbui"
import {
datasources,
tables,
@ -67,6 +67,7 @@
text: action.name,
onClick: async row => {
await rowActions.trigger(id, action.id, row._id)
notifications.success("Row action triggered successfully")
},
}))
}