UX: closes multi-select on selection when maximum=1 (#15092)

This commit is contained in:
Joffrey JAFFEUX
2021-11-29 14:29:11 +01:00
committed by GitHub
parent 354f88358c
commit 3dc0b9e077
2 changed files with 76 additions and 1 deletions
@@ -444,7 +444,10 @@ export default Component.extend(
resolve(items);
}).finally(() => {
if (!this.isDestroying && !this.isDestroyed) {
if (this.selectKit.options.closeOnChange) {
if (
this.selectKit.options.closeOnChange ||
(isPresent(value) && this.selectKit.options.maximum === 1)
) {
this.selectKit.close(event);
}