@vsn-ux/ngx-gaia 0.9.6 → 0.9.8
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.
|
@@ -4080,6 +4080,7 @@ class GaSelectComponent {
|
|
|
4080
4080
|
else {
|
|
4081
4081
|
this.focusListbox();
|
|
4082
4082
|
}
|
|
4083
|
+
this.scrollActiveOptionIntoView();
|
|
4083
4084
|
this.opened.emit();
|
|
4084
4085
|
}
|
|
4085
4086
|
onOverlayDetach() {
|
|
@@ -4124,6 +4125,19 @@ class GaSelectComponent {
|
|
|
4124
4125
|
this.cdkListbox()._setActiveOption(options[nextIndex].cdkOption);
|
|
4125
4126
|
}
|
|
4126
4127
|
}
|
|
4128
|
+
scrollActiveOptionIntoView() {
|
|
4129
|
+
afterNextRender({
|
|
4130
|
+
mixedReadWrite: () => {
|
|
4131
|
+
const activeOption = this.gaOptions().find((option) => option.cdkOption.isActive());
|
|
4132
|
+
if (activeOption) {
|
|
4133
|
+
activeOption.cdkOption.element.scrollIntoView({
|
|
4134
|
+
block: 'nearest',
|
|
4135
|
+
inline: 'nearest',
|
|
4136
|
+
});
|
|
4137
|
+
}
|
|
4138
|
+
},
|
|
4139
|
+
}, { injector: this.injector });
|
|
4140
|
+
}
|
|
4127
4141
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4128
4142
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaSelectComponent, isStandalone: true, selector: "ga-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, clearableLabel: { classPropertyName: "clearableLabel", publicName: "clearableLabel", isSignal: true, isRequired: false, transformFunction: null }, canSelectNullable: { classPropertyName: "canSelectNullable", publicName: "canSelectNullable", isSignal: true, isRequired: false, transformFunction: null }, textValue: { classPropertyName: "textValue", publicName: "textValue", isSignal: true, isRequired: false, transformFunction: null }, leftIcon: { classPropertyName: "leftIcon", publicName: "leftIcon", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", textValue: "textValueChange", opened: "opened", closed: "closed" }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "click": "toggle()", "keydown.arrowdown": "open(); $event.preventDefault()", "keydown.space": "open(); $event.preventDefault()", "keydown.enter": "open(); $event.preventDefault()", "keydown.backspace": "clearValue(); $event.preventDefault()" }, properties: { "attr.id": "id()", "class.ga-select--multi": "multiple()", "class.ga-select--expanded": "isOpen()", "class.ga-select--disabled": "disabled()", "class.ga-select--invalid": "invalid()", "class.ga-select--empty": "!hasValue()", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "isOpen() ? cdkListbox().id : null", "attr.aria-invalid": "invalid()", "attr.aria-disabled": "disabled()", "attr.aria-owns": "isOpen() && searchable() ? cdkListbox().id : null", "attr.aria-activedescendant": "isOpen() && !searchable() ? activeDescendantId() : null", "attr.tabindex": "disabled() ? -1 : 0" }, classAttribute: "ga-select" }, providers: [
|
|
4129
4143
|
{
|