mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Hotfix :: Components not showing up in dropdown for csa using page event handler (#7539)
* fix :: componenets not showing up on page events for csa * remove comment
This commit is contained in:
parent
3c4954ae4d
commit
dea78173f6
1 changed files with 6 additions and 7 deletions
|
|
@ -121,19 +121,18 @@ export const EventManager = ({
|
|||
});
|
||||
return componentOptions;
|
||||
}
|
||||
// currently blocking items inside subcontainer because they can't be controlled through event manager
|
||||
// use components instead of currentState?.components to get all the components in canvas
|
||||
|
||||
function getComponentOptionsOfComponentsWithActions(componentType = '') {
|
||||
let componentOptions = [];
|
||||
Object.values(currentState?.components || {}).forEach((value) => {
|
||||
Object.keys(components || {}).forEach((key) => {
|
||||
const targetComponentMeta = componentTypes.find(
|
||||
(componentType) => components[value.id]?.component?.component === componentType?.component
|
||||
(componentType) => components[key].component.component === componentType.component
|
||||
);
|
||||
if ((targetComponentMeta?.actions?.length ?? 0) > 0) {
|
||||
if (componentType === '' || components[value.id].component.component === componentType) {
|
||||
if (componentType === '' || components[key].component.component === componentType) {
|
||||
componentOptions.push({
|
||||
name: components[value.id].component.name,
|
||||
value: value.id,
|
||||
name: components[key].component.name,
|
||||
value: key,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue