Skip to content

Commit

Permalink
tag multiselect shouldnt use model updating on blur
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Jan 31, 2024
1 parent 3d72dae commit 071a8a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 7 additions & 0 deletions client/src/app/forms/types/tag-input/tag-input.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions client/src/app/forms/types/tag-input/tag-input.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ const TagInputMixin = mixin(
})
export class CvcTagInputField extends TagInputMixin implements AfterViewInit {
defaultOptions: Partial<FieldTypeConfig<CvcTagInputProps>> = {
modelOptions: {
// update model when focus leaves field
// (template's keydown.enter listener blurs the field, updating the model)
updateOn: 'blur',
},
props: {
label: 'Enter value',
},
Expand Down

0 comments on commit 071a8a2

Please sign in to comment.