Show notification when running row actions in the data section
This commit is contained in:
parent
dda078d743
commit
a4c67f1812
|
@ -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")
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue