Merge pull request #1110 from ing-bank/fix/ArrowMixinStyles

fix: point to parent constructor in static get styles (points to undefined atm)
This commit is contained in:
Thijs Louisse 2020-12-01 11:49:54 +01:00 committed by GitHub
commit df978dd8bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 6 deletions

View file

@ -0,0 +1,7 @@
---
'@lion/form-core': patch
'@lion/listbox': patch
'@lion/overlays': patch
---
fix: point to parent constructor in styles getter

View file

@ -615,7 +615,8 @@ const FormControlMixinImplementation = superclass =>
* - {element} .input-group__after (optional) : a suffix that resides outside the container * - {element} .input-group__after (optional) : a suffix that resides outside the container
*/ */
static get styles() { static get styles() {
const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype
.constructor);
return [ return [
superCtor.styles ? superCtor.styles : [], superCtor.styles ? superCtor.styles : [],
css` css`

View file

@ -136,7 +136,8 @@ const ChoiceInputMixinImplementation = superclass =>
* For [role=option] extensions, please override completely * For [role=option] extensions, please override completely
*/ */
static get styles() { static get styles() {
const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype
.constructor);
return [ return [
superCtor.styles ? superCtor.styles : [], superCtor.styles ? superCtor.styles : [],
css` css`

View file

@ -73,7 +73,8 @@ const ListboxMixinImplementation = superclass =>
} }
static get styles() { static get styles() {
const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype
.constructor);
return [ return [
superCtor.styles ? superCtor.styles : [], superCtor.styles ? superCtor.styles : [],
css` css`

View file

@ -24,7 +24,8 @@ export const ArrowMixinImplementation = superclass =>
} }
static get styles() { static get styles() {
const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype
.constructor);
return [ return [
superCtor.styles ? superCtor.styles : [], superCtor.styles ? superCtor.styles : [],
css` css`
@ -102,9 +103,9 @@ export const ArrowMixinImplementation = superclass =>
} }
/** /**
* @overridable method `_defineOverlay` * Overrides arrow and keepTogether modifier to be enabled,
* @desc Overrides arrow and keepTogether modifier to be enabled,
* and adds onCreate and onUpdate hooks to sync from popper state * and adds onCreate and onUpdate hooks to sync from popper state
* @configure OverlayMixin
* @returns {OverlayConfig} * @returns {OverlayConfig}
*/ */
// eslint-disable-next-line // eslint-disable-next-line