Merge branch 'master' into revert-12832-revert-11830-global-bindings
This commit is contained in:
commit
68d2634888
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.15.6",
|
"version": "2.15.7",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|
|
@ -1080,11 +1080,48 @@ export const getAllStateVariables = () => {
|
||||||
getAllAssets().forEach(asset => {
|
getAllAssets().forEach(asset => {
|
||||||
findAllMatchingComponents(asset.props, component => {
|
findAllMatchingComponents(asset.props, component => {
|
||||||
const settings = getComponentSettings(component._component)
|
const settings = getComponentSettings(component._component)
|
||||||
settings
|
|
||||||
.filter(setting => setting.type === "event")
|
const parseEventSettings = (settings, comp) => {
|
||||||
.forEach(setting => {
|
settings
|
||||||
eventSettings.push(component[setting.key])
|
.filter(setting => setting.type === "event")
|
||||||
})
|
.forEach(setting => {
|
||||||
|
eventSettings.push(comp[setting.key])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const parseComponentSettings = (settings, component) => {
|
||||||
|
// Parse the nested button configurations
|
||||||
|
settings
|
||||||
|
.filter(setting => setting.type === "buttonConfiguration")
|
||||||
|
.forEach(setting => {
|
||||||
|
const buttonConfig = component[setting.key]
|
||||||
|
|
||||||
|
if (Array.isArray(buttonConfig)) {
|
||||||
|
buttonConfig.forEach(button => {
|
||||||
|
const nestedSettings = getComponentSettings(button._component)
|
||||||
|
parseEventSettings(nestedSettings, button)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
parseEventSettings(settings, component)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse the base component settings
|
||||||
|
parseComponentSettings(settings, component)
|
||||||
|
|
||||||
|
// Parse step configuration
|
||||||
|
const stepSetting = settings.find(
|
||||||
|
setting => setting.type === "stepConfiguration"
|
||||||
|
)
|
||||||
|
const steps = stepSetting ? component[stepSetting.key] : []
|
||||||
|
const stepDefinition = getComponentSettings(
|
||||||
|
"@budibase/standard-components/multistepformblockstep"
|
||||||
|
)
|
||||||
|
|
||||||
|
steps.forEach(step => {
|
||||||
|
parseComponentSettings(stepDefinition, step)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -108,16 +108,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: forceFetchRows(filter, fieldApi)
|
$: forceFetchRows(filter)
|
||||||
$: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
$: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
||||||
|
|
||||||
const forceFetchRows = async () => {
|
const forceFetchRows = async () => {
|
||||||
if (!fieldApi) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// if the filter has changed, then we need to reset the options, clear the selection, and re-fetch
|
// if the filter has changed, then we need to reset the options, clear the selection, and re-fetch
|
||||||
optionsObj = {}
|
optionsObj = {}
|
||||||
fieldApi.setValue([])
|
fieldApi?.setValue([])
|
||||||
selectedValue = []
|
selectedValue = []
|
||||||
debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue