Merge pull request #14921 from Budibase/cheeks-fixes

Conditions reactivity fix + row actions improvement
This commit is contained in:
Andrew Kingston 2024-10-30 15:29:35 +00:00 committed by GitHub
commit 7731aa4108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -554,7 +554,12 @@
cachedSettings = { ...allSettings } cachedSettings = { ...allSettings }
initialSettings = cachedSettings initialSettings = cachedSettings
} else { } else {
Object.keys(allSettings).forEach(key => { // We need to compare all keys from both the current and previous settings, as
// keys may have disappeared in the current set which would otherwise be ignored
// if we only checked the current set keys
const keys = new Set(Object.keys(allSettings))
Object.keys(cachedSettings).forEach(key => keys.add(key))
keys.forEach(key => {
const same = propsAreSame(allSettings[key], cachedSettings[key]) const same = propsAreSame(allSettings[key], cachedSettings[key])
if (!same) { if (!same) {
// Updated cachedSettings (which is assigned by reference to // Updated cachedSettings (which is assigned by reference to

View File

@ -500,6 +500,10 @@ const rowActionHandler = async action => {
sourceId: resourceId, sourceId: resourceId,
rowId, rowId,
}) })
// Refresh related datasources
await dataSourceStore.actions.invalidateDataSource(resourceId, {
invalidateRelationships: true,
})
} }
const handlerMap = { const handlerMap = {