I’ve used extendOf
but the properties are not being merged.
Check how jonl_browser_property
disappears.


I’ve tried several combinations of extendOf
and replaces
but I can’t seem to achieve one of the most important use cases of extensibility: Add to a Wappler component custom functionality.
I’ve seen a lot of requests in the forum asking for a specific API method or attribute to be added to a Wappler component. Take the calendar as an example.
Say a few methods from the API being used by Wappler component were not added because they were not identified as useful for many people. But maybe it is useful for me. I would like to create a custom component that extends
the calendar with the less code possible. This means that I want to keep using Wappler’s calendar but just add one method to the logic and selectable in the UI for that component.
I don’t want to recreate the whole component just to add one method. Is this possible with some combination of extendOf
and/or replaces
?
If not, a new option called extends
for the hjson would be useful. My custom component extends dmx-calendar
by adding just one missing method. I would continue using the Wappler calendar component and I would be able to select this custom method in the UI when some sort of event happens.
These properties/methods/attributes would all be labeled with “Extension” or something similar and have a tooltip or popover that points at the custom extension that extends it.
Most probably hooks would have to be added to each Wappler component so that this custom logic can be injected.
Maybe this overcomplicates the matter and there is an easy way.
To summarize it. A way to extend a Wappler component with the least amount of code possible. This means not to recreate the whole component just to add one method. The extendsOf
looked promising but as the properties, methods, attributes and events are not being merged in the UI you need to build a whole new UI for the component just to add a missing method.