@quadrel-enterprise-ui/framework 21.20.1 → 21.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23454,6 +23454,9 @@ class QdFilterItemSelectCategoryComponent {
|
|
|
23454
23454
|
get isRadioGroup() {
|
|
23455
23455
|
return this.type === 'singleSelect';
|
|
23456
23456
|
}
|
|
23457
|
+
get isOpenListboxWithoutItemFilter() {
|
|
23458
|
+
return this.open && !this.isRadioGroup && !this.filter;
|
|
23459
|
+
}
|
|
23457
23460
|
createKeyManager() {
|
|
23458
23461
|
const manager = this.isRadioGroup
|
|
23459
23462
|
? new FocusKeyManager(this.options)
|
|
@@ -23479,6 +23482,8 @@ class QdFilterItemSelectCategoryComponent {
|
|
|
23479
23482
|
this.publishOptions();
|
|
23480
23483
|
if (this.isRadioGroup)
|
|
23481
23484
|
this.ensureTabStop();
|
|
23485
|
+
if (this.isOpenListboxWithoutItemFilter)
|
|
23486
|
+
queueMicrotask(() => this.ensureActiveOptionIfOpen());
|
|
23482
23487
|
}
|
|
23483
23488
|
unregisterOption(option) {
|
|
23484
23489
|
const index = this.registeredOptions.indexOf(option);
|
|
@@ -23517,14 +23522,19 @@ class QdFilterItemSelectCategoryComponent {
|
|
|
23517
23522
|
onLayerOpened() {
|
|
23518
23523
|
this.open = true;
|
|
23519
23524
|
this.freezeDropdownOrder();
|
|
23520
|
-
this.
|
|
23525
|
+
this.activateInitialOption();
|
|
23521
23526
|
this.updateListboxAriaState();
|
|
23522
23527
|
}
|
|
23523
|
-
|
|
23524
|
-
if (!this.
|
|
23528
|
+
activateInitialOption() {
|
|
23529
|
+
if (!this.options.length)
|
|
23525
23530
|
return;
|
|
23526
|
-
|
|
23527
|
-
|
|
23531
|
+
if (this.isRadioGroup) {
|
|
23532
|
+
this.keyManager?.updateActiveItem(this.initialActiveOption());
|
|
23533
|
+
this.moveTabStopToActiveOption();
|
|
23534
|
+
return;
|
|
23535
|
+
}
|
|
23536
|
+
if (!this.filter)
|
|
23537
|
+
this.ensureActiveOption();
|
|
23528
23538
|
}
|
|
23529
23539
|
onLayerClosed() {
|
|
23530
23540
|
this.open = false;
|
|
@@ -23587,6 +23597,10 @@ class QdFilterItemSelectCategoryComponent {
|
|
|
23587
23597
|
this.keyManager.setActiveItem(this.initialActiveOption());
|
|
23588
23598
|
this.updateListboxAriaState();
|
|
23589
23599
|
}
|
|
23600
|
+
ensureActiveOptionIfOpen() {
|
|
23601
|
+
if (this.isOpenListboxWithoutItemFilter)
|
|
23602
|
+
this.ensureActiveOption();
|
|
23603
|
+
}
|
|
23590
23604
|
initialActiveOption() {
|
|
23591
23605
|
return this.options.find(option => !!option.active) ?? this.options.first;
|
|
23592
23606
|
}
|