Closed libklein closed 1 year ago
A clear event raised by a multi-select carries a reference to the cleared item in the details field:
details
https://github.com/rob-balfre/svelte-select/blob/master/src/lib/Select.svelte#L341
The details of clear events raised by single-selects is always undefined:
undefined
https://github.com/rob-balfre/svelte-select/blob/master/src/lib/Select.svelte#L468
I think we should align behavior in both cases. Imho, most people would expect a reference to the cleared item in the raised event and there are several usecases:
@libklein thanks very much. Released in 5.1.0
A clear event raised by a multi-select carries a reference to the cleared item in the
details
field:https://github.com/rob-balfre/svelte-select/blob/master/src/lib/Select.svelte#L341
The
details
of clear events raised by single-selects is alwaysundefined
:https://github.com/rob-balfre/svelte-select/blob/master/src/lib/Select.svelte#L468
I think we should align behavior in both cases. Imho, most people would expect a reference to the cleared item in the raised event and there are several usecases: