Skip to content

Commit

Permalink
resolve #8406 Placeholder text value in the Tag box isn't synced with…
Browse files Browse the repository at this point in the history
… the Property Grid and the Preview (#8429)

Co-authored-by: OlgaLarina <[email protected]>
  • Loading branch information
OlgaLarina and OlgaLarina authored Jun 18, 2024
1 parent eccd54a commit 14a8ad1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dropdownMultiSelectListModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
9 changes: 9 additions & 0 deletions tests/dropdown_multi_select_list_model_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <QuestionTagboxModel>survey.getAllQuestions()[0];
const dropdownListModel = question.dropdownListModel;
assert.equal(dropdownListModel.filterStringPlaceholder, "Select...");

question.placeholder = "Choose...";
assert.equal(dropdownListModel.filterStringPlaceholder, "Choose...");
});

0 comments on commit 14a8ad1

Please sign in to comment.