Problem with deriving from built-in widgets which does not support generics

286
0
04-19-2023 07:39 AM
Gurunara
New Contributor III

Trying to derive from built-in widgets to add custom functionalities or workarounds.

For the most part been successful with it, but there is one issue came across:

for e.g.

doing something like:

import Edit from '../../../../../dist/widgets/common/edit/src/runtime/widget';

export default class Widget extends Edit { ... }

but the base class does not support generics, so currently there doesn't seem to be a way to add to (modify) the base class state or property interfaces, which are being used in the base classes...

Need to add fields to persisted state properties from settings that will get persisted to the widget during runtime, in child setting/widget classes that derive from base built-in widgets...

Is there way of inheriting from the base built-in classes (both for the Widget and Setting classes) to accomplish this?


0 Kudos
0 Replies