@db-ux/ngx-core-components 4.3.1 → 4.3.2-consolidation-7549d9f
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.
|
@@ -3226,6 +3226,14 @@ class DBCustomSelect {
|
|
|
3226
3226
|
activeElement.click();
|
|
3227
3227
|
event.preventDefault();
|
|
3228
3228
|
}
|
|
3229
|
+
else if (activeElement.getAttribute("type") === "search") {
|
|
3230
|
+
// When Enter is pressed in search field, select the first available option
|
|
3231
|
+
const firstOption = this._options()?.find((opt) => !opt.isGroupTitle && !opt.disabled);
|
|
3232
|
+
if (firstOption?.value) {
|
|
3233
|
+
this.handleSelect(firstOption.value);
|
|
3234
|
+
event.preventDefault();
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3229
3237
|
}
|
|
3230
3238
|
}
|
|
3231
3239
|
else if (event.key === "ArrowDown" ||
|
|
@@ -4469,7 +4477,7 @@ class DBDrawer {
|
|
|
4469
4477
|
const open = Boolean(this.open());
|
|
4470
4478
|
if (open && !this._ref()?.nativeElement.open) {
|
|
4471
4479
|
if (this.dialogContainerRef()?.nativeElement) {
|
|
4472
|
-
this.dialogContainerRef()
|
|
4480
|
+
(this.dialogContainerRef()?.nativeElement).removeAttribute("data-transition");
|
|
4473
4481
|
}
|
|
4474
4482
|
if (this.position() === "absolute" ||
|
|
4475
4483
|
this.backdrop() === "none" ||
|
|
@@ -4479,15 +4487,17 @@ class DBDrawer {
|
|
|
4479
4487
|
else {
|
|
4480
4488
|
this._ref()?.nativeElement.showModal();
|
|
4481
4489
|
}
|
|
4490
|
+
void delay(() => {
|
|
4491
|
+
if (this.dialogContainerRef()?.nativeElement) {
|
|
4492
|
+
(this.dialogContainerRef()?.nativeElement).dataset["transition"] = "open";
|
|
4493
|
+
}
|
|
4494
|
+
}, 1);
|
|
4482
4495
|
}
|
|
4483
4496
|
if (!open && this._ref()?.nativeElement.open) {
|
|
4484
4497
|
if (this.dialogContainerRef()?.nativeElement) {
|
|
4485
|
-
this.dialogContainerRef()
|
|
4498
|
+
(this.dialogContainerRef()?.nativeElement).dataset["transition"] = "close";
|
|
4486
4499
|
}
|
|
4487
|
-
delay(() => {
|
|
4488
|
-
if (this.dialogContainerRef()?.nativeElement) {
|
|
4489
|
-
this.dialogContainerRef().nativeElement.hidden = false;
|
|
4490
|
-
}
|
|
4500
|
+
void delay(() => {
|
|
4491
4501
|
this._ref()?.nativeElement?.close();
|
|
4492
4502
|
}, 401);
|
|
4493
4503
|
}
|