Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/modules/select/classes/select-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,10 @@ export abstract class SuiSelectBase<T, U> implements AfterContentInit, OnDestroy
this._renderedSubscriptions = [];

this._renderedOptions.forEach(ro => {
// Slightly delay initialisation to avoid change after checked errors. TODO - look into avoiding this!
setTimeout(() => this.initialiseRenderedOption(ro));

this._renderedSubscriptions.push(ro.onSelected.subscribe(() => this.selectOption(ro.value)));
});

// Slightly delay initialisation to avoid change after checked errors. TODO - look into avoiding this!
setTimeout(() => this._renderedOptions.forEach(ro => this.initialiseRenderedOption(ro)));
// If no options have been provided, autogenerate them from the rendered ones.
if (this.searchService.options.length === 0 && !this.searchService.optionsLookup) {
this.options = this._renderedOptions.map(ro => ro.value);
Expand Down