Use explicit svelte store 'get' when clicking buttons in grids

This commit is contained in:
Andrew Kingston 2023-11-07 14:22:09 +00:00
parent 19a9318eac
commit 3d2cd9cc0b
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@
// We add a fake context binding in here, which allows us to pretend // We add a fake context binding in here, which allows us to pretend
// that the grid provides a "schema" binding - that lets us use the // that the grid provides a "schema" binding - that lets us use the
// clicked row in things like save row actions // clicked row in things like save row actions
const enrichedContext = { ...get(context), [$component.id]: row } const enrichedContext = { ...get(context), [get(component).id]: row }
const fn = enrichButtonActions(settings.onClick, enrichedContext) const fn = enrichButtonActions(settings.onClick, enrichedContext)
return await fn?.({ row }) return await fn?.({ row })
}, },