diff --git a/src/Umbraco.Web.UI.Client/src/packages/settings/data-types/modals/data-type-picker-flow/data-type-picker-flow-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/settings/data-types/modals/data-type-picker-flow/data-type-picker-flow-modal.element.ts index 13b2ffda0f..036b16f18b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/settings/data-types/modals/data-type-picker-flow/data-type-picker-flow-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/settings/data-types/modals/data-type-picker-flow/data-type-picker-flow-modal.element.ts @@ -139,12 +139,16 @@ export class UmbDataTypePickerFlowModalElement extends UmbLitElement { } private _performFiltering() { if (this.#currentFilterQuery) { - this._groupedDataTypes = groupBy( - this.#dataTypes.filter((dataType) => { - return dataType.name?.toLowerCase().includes(this.#currentFilterQuery); - }), - 'meta.group', + const filteredDataTypes = this.#dataTypes.filter( + (dataType) => dataType.name?.toLowerCase().includes(this.#currentFilterQuery), ); + + /* TODO: data type items doesn't have a group property. We will need a reference to the property editor UI to get the group. + this is a temp solution to group them as uncategorized. The same result as with the lodash groupBy. + */ + this._groupedDataTypes = { + undefined: filteredDataTypes, + }; } else { this._groupedDataTypes = undefined; } @@ -158,7 +162,13 @@ export class UmbDataTypePickerFlowModalElement extends UmbLitElement { ); }); - this._groupedPropertyEditorUIs = groupBy(filteredUIs, 'meta.group'); + // TODO: groupBy is not known by TS yet + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error + this._groupedPropertyEditorUIs = Object.groupBy( + filteredUIs, + (propertyEditorUI: ManifestPropertyEditorUi) => propertyEditorUI.meta.group, + ); } private _close() {