From ecaa165c1fbb790e9e2b744cd4e2f78f665f2f34 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Thu, 30 Dec 2021 17:09:25 +0100 Subject: [PATCH] fixes --- .../app/components/ui-property.vue | 2 ++ zero.Backoffice.UI/app/editor/editor-field.ts | 26 +++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/zero.Backoffice.UI/app/components/ui-property.vue b/zero.Backoffice.UI/app/components/ui-property.vue index 49859e35..a45c6293 100644 --- a/zero.Backoffice.UI/app/components/ui-property.vue +++ b/zero.Backoffice.UI/app/components/ui-property.vue @@ -204,6 +204,8 @@ color: var(--color-required-marker); margin-left: 0.2em; font-weight: 400; + pointer-events: none; + user-select: none; } .ui-property-content diff --git a/zero.Backoffice.UI/app/editor/editor-field.ts b/zero.Backoffice.UI/app/editor/editor-field.ts index e790754b..ccb36acd 100644 --- a/zero.Backoffice.UI/app/editor/editor-field.ts +++ b/zero.Backoffice.UI/app/editor/editor-field.ts @@ -112,7 +112,8 @@ export function createDefaultFieldConfiguration(): ZeroEditorFieldConfiguration helpText: null, classes: null, horizontal: false, - sort: 0 + sort: 0, + preview: undefined } as ZeroEditorFieldConfiguration; } @@ -158,5 +159,26 @@ export interface ZeroEditorFieldConfiguration /** * Sort order for fields within the editor canvas **/ - sort?: number + sort?: number, + /** + * Sort order for fields within the editor canvas + **/ + preview?: ZeroEditorFieldFilterPreview +} + + +export interface ZeroEditorFieldFilterPreview +{ + /** + * Icon which is displayed next to the filter option + */ + icon?: string; + /** + * Checks whether the selected value for the filter option is valid and if it should be marked as selected + */ + selected?: (value: any, model: any) => boolean; + /** + * Renders the filter value which is previewed + */ + value?: (value: any, model: any) => string; } \ No newline at end of file