From 071a8a27c359dfeafecaa7f8ef8ba10085e4b549 Mon Sep 17 00:00:00 2001 From: Adam Coffman Date: Wed, 31 Jan 2024 11:00:08 -0600 Subject: [PATCH] tag multiselect shouldnt use model updating on blur --- client/src/app/forms/types/tag-input/tag-input.module.ts | 7 +++++++ client/src/app/forms/types/tag-input/tag-input.type.ts | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/app/forms/types/tag-input/tag-input.module.ts b/client/src/app/forms/types/tag-input/tag-input.module.ts index 76e46d943..69d2b2d92 100644 --- a/client/src/app/forms/types/tag-input/tag-input.module.ts +++ b/client/src/app/forms/types/tag-input/tag-input.module.ts @@ -16,6 +16,13 @@ const typeConfig: ConfigOption = { name: 'tag-input', wrappers: ['form-field'], component: CvcTagInputField, + defaultOptions: { + modelOptions: { + // update model when focus leaves field + // (template's keydown.enter listener blurs the field, updating the model) + updateOn: 'blur', + }, + }, }, { // for use in repeat-field types diff --git a/client/src/app/forms/types/tag-input/tag-input.type.ts b/client/src/app/forms/types/tag-input/tag-input.type.ts index f24808712..62d550f54 100644 --- a/client/src/app/forms/types/tag-input/tag-input.type.ts +++ b/client/src/app/forms/types/tag-input/tag-input.type.ts @@ -36,11 +36,6 @@ const TagInputMixin = mixin( }) export class CvcTagInputField extends TagInputMixin implements AfterViewInit { defaultOptions: Partial> = { - modelOptions: { - // update model when focus leaves field - // (template's keydown.enter listener blurs the field, updating the model) - updateOn: 'blur', - }, props: { label: 'Enter value', },