components icon indicating copy to clipboard operation
components copied to clipboard

mat-select model don't update after removing options programmatically

Open luizotcarvalho opened this issue 7 years ago • 4 comments
trafficstars

Bug, feature request, or proposal:

Bug

What is the expected behavior?

I expect to get the model updated and the change event called after remove selected options of the options list.

What is the current behavior?

The model don't update and the change event is not called, but visually is updated.

What are the steps to reproduce?

1 - http://plnkr.co/edit/RNAeZbaNrtMQRrjC7IDc?p=preview ; 2 - Click on "Remove options"; 3 - mat-select visually update; 4 - model dont update and change event is not called;

What is the use-case or motivation for changing an existing behavior?

If I change the options for any reason, I expect to get the change events and the model to be updated in order to keep data consistent;

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

master

Is there anything else we should know?

No

luizotcarvalho avatar Dec 18 '17 20:12 luizotcarvalho

We will need to determine if changes should propagate as you described.

Personally, I think that if we do propagate some of these changes up, we need to have a different emitter for non selected value affecting.

josephperrott avatar Dec 18 '17 20:12 josephperrott

@josephperrott even if be decided that changes should not propagate, it's necessary to have a way to force this changes thru the component api in order to update the model accordingly with the new set of options.

What do you think?

luizotcarvalho avatar Dec 19 '17 12:12 luizotcarvalho

Any updates here? there's a pull request but no updates ))

mhmo91 avatar Oct 21 '19 10:10 mhmo91

Any update on that matter ?

anasbud avatar Sep 16 '24 18:09 anasbud

any updates? it's been 7+ years.. how low are these discussions? 😅

marian-toaderr avatar Jan 28 '25 13:01 marian-toaderr