Skip to content

Commit

Permalink
work for #4780 : rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed Oct 13, 2022
1 parent af08d06 commit 180abdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/dropdownListModel.ts
Expand Up @@ -4,7 +4,7 @@ import { ItemValue } from "./itemvalue";
import { property } from "./jsonobject";
import { ListModel } from "./list";
import { PopupModel } from "./popup";
import { QuestionSelectBase } from "./question_baseselect";
import { Question } from "./question";
import { doKey2ClickBlur, doKey2ClickUp } from "./utils/utils";

const pageSize = 25;
Expand Down Expand Up @@ -67,6 +67,7 @@ export class DropdownListModel extends Base {
this._popupModel.cssClass = this.popupCssClasses;
this._popupModel.onVisibilityChanged.add((_, option: { isVisible: boolean }) => {
if(option.isVisible && this.question.lazyLoading) {
this.listModel.actions = [];
this.updateQuestionData();
}

Expand All @@ -79,7 +80,6 @@ export class DropdownListModel extends Base {

if(this.question.lazyLoading) {
this.resetItemsSettings();
this.question.choices = [];
}
}
});
Expand Down Expand Up @@ -161,7 +161,7 @@ export class DropdownListModel extends Base {
}
}) hasScroll: boolean;

constructor(protected question: QuestionSelectBase, protected onSelectionChanged?: (item: IAction, ...params: any[]) => void) {
constructor(protected question: Question, protected onSelectionChanged?: (item: IAction, ...params: any[]) => void) {
super();
this.listModel = this.createListModel();
this.listModel.cssClasses = question.survey?.getCss().list;
Expand Down
4 changes: 2 additions & 2 deletions src/dropdownMultiSelectListModel.ts
Expand Up @@ -3,7 +3,7 @@ import { DropdownListModel } from "./dropdownListModel";
import { ItemValue } from "./itemvalue";
import { property } from "./jsonobject";
import { MultiSelectListModel } from "./multiSelectListModel";
import { QuestionSelectBase } from "./question_baseselect";
import { Question } from "./question";

export class DropdownMultiSelectListModel extends DropdownListModel {

Expand Down Expand Up @@ -93,7 +93,7 @@ export class DropdownMultiSelectListModel extends DropdownListModel {
this.popupTargetModified();
}

constructor(question: QuestionSelectBase, onSelectionChanged?: (item: IAction, ...params: any[]) => void) {
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void) {
super(question, onSelectionChanged);
this.setHideSelectedItems(question.hideSelectedItems);
this.syncFilterStringPlacholder();
Expand Down

0 comments on commit 180abdd

Please sign in to comment.