Fix filter when selecting elements for block types (#19369)
* fix filter * remove console log
This commit is contained in:
@@ -116,8 +116,7 @@ export class UmbInputBlockTypeElement<
|
||||
// Only pick elements:
|
||||
docType.isElement &&
|
||||
// Prevent picking the an already used element type:
|
||||
this.#filter &&
|
||||
this.#filter.find((x) => x.contentElementTypeKey === docType.unique) === undefined,
|
||||
this.#filter?.find((x) => x.contentElementTypeKey === docType.unique) === undefined,
|
||||
},
|
||||
value: {
|
||||
selection: [],
|
||||
|
||||
@@ -74,7 +74,7 @@ export class UmbPickerSearchResultElement extends UmbLitElement {
|
||||
.filter=${(manifest: ManifestPickerSearchResultItem) => manifest.forEntityTypes.includes(item.entityType)}
|
||||
.elementProps=${{
|
||||
item,
|
||||
disabled: !this.pickableFilter(item),
|
||||
disabled: this.pickableFilter ? !this.pickableFilter(item) : undefined,
|
||||
}}></umb-extension-with-api-slot>
|
||||
`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user