1
0
Fork 0
mirror of synced 2024-09-28 07:11:40 +12:00

Fix for settings definition cache getting overwritten when both table and gridblock are on the same screen

This commit is contained in:
Dean 2024-03-21 14:30:18 +00:00
parent 5066f54525
commit 7d1c9b1337

View file

@ -246,15 +246,18 @@
return
}
const cacheId = `${definition.name}${
definition?.deprecated === true ? "_deprecated" : ""
}`
// Get the settings definition for this component, and cache it
if (SettingsDefinitionCache[definition.name]) {
settingsDefinition = SettingsDefinitionCache[definition.name]
settingsDefinitionMap = SettingsDefinitionMapCache[definition.name]
if (SettingsDefinitionCache[cacheId]) {
settingsDefinition = SettingsDefinitionCache[cacheId]
settingsDefinitionMap = SettingsDefinitionMapCache[cacheId]
} else {
settingsDefinition = getSettingsDefinition(definition)
settingsDefinitionMap = getSettingsDefinitionMap(settingsDefinition)
SettingsDefinitionCache[definition.name] = settingsDefinition
SettingsDefinitionMapCache[definition.name] = settingsDefinitionMap
SettingsDefinitionCache[cacheId] = settingsDefinition
SettingsDefinitionMapCache[cacheId] = settingsDefinitionMap
}
// Parse the instance settings, and cache them