Skip to content

Commit 4b1f88f

Browse files
authored
refactor: use new setData() to remove duplicate code (#465)
1 parent 2ccc7fc commit 4b1f88f

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

packages/multiple-select-vanilla/src/MultipleSelectInstance.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,13 +1252,9 @@ export class MultipleSelectInstance {
12521252
// resolve callback
12531253
data => {
12541254
// when data is ready, remove spinner & update dropdown and selection
1255-
this.options.data = data;
12561255
this._isLazyLoaded = true;
12571256
this.dropElm?.querySelector('.ms-loading')?.remove();
1258-
this.initData();
1259-
this.initList(true);
1260-
this.update();
1261-
this.adjustDropSizeAndPosition();
1257+
this.setData(data, true);
12621258
},
12631259
// reject callback
12641260
(errorText?: string) => {

0 commit comments

Comments
 (0)