two multiselect interaction

UI Components for Angular
Post Reply
Posts: 1
Joined: 17 Jun 2019, 15:09

17 Jun 2019, 15:16

I have two multiselects one for car brands the other for models.
When user picks the brands the options for the models multiselect are updated.

Im using a getter for this to happen

get brandModels(): SelectItem[] {
var modelsArray = [];
if (this.selectedBrands && this.selectedBrands.length > 0)
.filter(ab => this.selectedBrands.indexOf( > -1)
.forEach(i => { i.models.forEach(m => modelsArray.push(m)) });
return modelsArray
.map(i => { return { label:, value: } });

Now finally the question:)
How can i get the value of the input of the brands multiselect in the brandModels getter so i fix my getter to return filtered results

Thank you!

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest