From 14a8ad1c575dd889e55be7a86639770ca8b82054 Mon Sep 17 00:00:00 2001 From: OlgaLarina Date: Tue, 18 Jun 2024 09:48:24 +0300 Subject: [PATCH] resolve #8406 Placeholder text value in the Tag box isn't synced with the Property Grid and the Preview (#8429) Co-authored-by: OlgaLarina --- src/dropdownMultiSelectListModel.ts | 2 +- tests/dropdown_multi_select_list_model_test.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dropdownMultiSelectListModel.ts b/src/dropdownMultiSelectListModel.ts index 81993ed5ff..e6fc186384 100644 --- a/src/dropdownMultiSelectListModel.ts +++ b/src/dropdownMultiSelectListModel.ts @@ -192,7 +192,7 @@ export class DropdownMultiSelectListModel extends DropdownListModel { protected onPropertyChangedHandler(sender: any, options: any) { super.onPropertyChangedHandler(sender, options); - if (options.name === "value" || options.name === "renderedValue") { + if (options.name === "value" || options.name === "renderedValue" || options.name === "placeholder") { this.syncFilterStringPlaceholder(); } } diff --git a/tests/dropdown_multi_select_list_model_test.ts b/tests/dropdown_multi_select_list_model_test.ts index e3664e4417..dcd267077c 100644 --- a/tests/dropdown_multi_select_list_model_test.ts +++ b/tests/dropdown_multi_select_list_model_test.ts @@ -355,5 +355,14 @@ QUnit.test("tagbox hint after deselect", function (assert) { dropdownListModel.keyHandler(event); assert.deepEqual(question.value, []); assert.equal(dropdownListModel.hintString, "item1", "item3 hintString again"); +}); + +QUnit.test("tagbox placeholder not updated", function (assert) { + const survey = new SurveyModel(jsonTagbox); + const question = survey.getAllQuestions()[0]; + const dropdownListModel = question.dropdownListModel; + assert.equal(dropdownListModel.filterStringPlaceholder, "Select..."); + question.placeholder = "Choose..."; + assert.equal(dropdownListModel.filterStringPlaceholder, "Choose..."); });