Merge pull request #1581 from remcovaes/fix/OverlayMixinTypeInfo

fix: type info in OverlayMixinTypes
This commit is contained in:
Thijs Louisse 2022-01-04 11:36:56 +01:00 committed by GitHub
commit c381be9c01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -0,0 +1,6 @@
---
'@lion/overlays': patch
'@lion/select-rich': patch
---
Fix type information for the overlayMixin and remove obsolete toggle

View file

@ -5,7 +5,6 @@ import { isEqualConfig } from './utils/is-equal-config.js';
/**
* @typedef {import('../types/OverlayConfig').OverlayConfig} OverlayConfig
* @typedef {import('../types/OverlayMixinTypes').DefineOverlayConfig} DefineOverlayConfig
* @typedef {import('../types/OverlayMixinTypes').OverlayHost} OverlayHost
* @typedef {import('../types/OverlayMixinTypes').OverlayMixin} OverlayMixin
*/

View file

@ -21,9 +21,9 @@ export declare class OverlayHost {
get config(): OverlayConfig;
set config(value: OverlayConfig);
open(): void;
close(): void;
toggle(): void;
open(): Promise<void>;
close(): Promise<void>;
toggle(): Promise<void>;
/**
* Sometimes it's needed to recompute Popper position of an overlay, for instance when we have
* an opened combobox and the surrounding context changes (the space consumed by the textbox

View file

@ -247,11 +247,6 @@ export class LionSelectRich extends SlotMixin(ScopedElementsMixin(OverlayMixin(L
this._onFormElementsChanged();
}
// TODO: move to overlayMixin and offer open and close
toggle() {
this.opened = !this.opened;
}
/**
* In the select disabled options are still going to a possible value for example
* when prefilling or programmatically setting it.