small update to handle special case

This commit is contained in:
Peter Clement 2025-01-31 11:58:03 +00:00
parent 233112e30f
commit 833403df37
1 changed files with 7 additions and 4 deletions

View File

@ -160,15 +160,17 @@
const settingsWithState = getSettingsWithState(component, stateKey) const settingsWithState = getSettingsWithState(component, stateKey)
settingsWithState.forEach(setting => { settingsWithState.forEach(setting => {
const label =
componentStore
.getDefinition(component._component)
?.settings?.find(t => t.key === setting)?.label || setting
// These have no label so have to set manually
if (setting === "_conditions") { if (setting === "_conditions") {
setting = "Conditions" setting = "Conditions"
} else if (setting === "_styles") { } else if (setting === "_styles") {
setting = "Styles" setting = "Styles"
} }
const label =
componentStore
.getDefinition(component._component)
?.settings?.find(t => t.key === setting)?.label || setting
componentsUsingState.push({ componentsUsingState.push({
id: component._id!, id: component._id!,
@ -193,6 +195,7 @@
if (!stateKey || !$selectedScreen?.props) { if (!stateKey || !$selectedScreen?.props) {
return return
} }
console.log($selectedScreen)
const componentStateUpdates = findComponentsUpdatingState( const componentStateUpdates = findComponentsUpdatingState(
$selectedScreen.props, $selectedScreen.props,
stateKey stateKey