You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ngx-select suports passing options via two methods:
As an input:
<ngx-select[options]="myOptions"></ngx-select>
As templates:
<ngx-select><ngx-select-option*ngFor ="let option of myOptions" [name]="option.name" [value]="option.value"></ngx-select-option></ngx-select>
When using the template method, if at least one option is rendered, followed by rendering zero options, ngx-select's internal options won't be updated because cases without any templates are ignored. This causes the component to continue displaying the previous list of options.
The code linked was probably written to ensure that when passing options as an input, the lack of option templates is ignored.
The text was updated successfully, but these errors were encountered:
swimlane-alex
changed the title
ngx-select doesn't react to zero empty option templates
ngx-select doesn't react to zero option templates
Dec 12, 2022
ngx-select
suports passing options via two methods:When using the template method, if at least one option is rendered, followed by rendering zero options,
ngx-select
's internal options won't be updated because cases without any templates are ignored. This causes the component to continue displaying the previous list of options.The code linked was probably written to ensure that when passing options as an input, the lack of option templates is ignored.
The text was updated successfully, but these errors were encountered: