Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82367

Modifying a custom widget's JS, seemingly small change breaks the app

$
0
0

Hi all

Am a bit stuck with what I thought would be a simple challenge.

At my company, all our pages that feature a Checkbox use this custom widget from the appstore, rather than the default input. We do this because it is more agreeable with the stylesheet we use. However, every time we include one we must add a custom class, "checkbox".

With this in mind, I would like to modify the widget so that it applies this class by default, to save devs time while building. I've been trying to include this line of code in the widget

dojo.addClass(this.domNode, "checkbox");

This is below line 120

 

So, this works brilliantly when the checkbox is included in the app. However, when the checkbox isn't in any pages and I try to run the app I am met with a blank screen and this error from the console

 

I was hoping someone could help answer my questions

  • What can I add to this widget to add this class without causing issues?
  • Why does a widget cause issues like this when it is not included in any page?

 

Thanks 

Luke


Viewing all articles
Browse latest Browse all 82367

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>