I have a custom module which displays a json list and is working fine. It uses node_help.js to fetch the json from a server.
I would like to hide the module, header and all, if there is no data available. I’ve tried adding show() and hide() in the socketNotifcationReceived() :
If (items.length> 0) {
this.show();
this.updateDom(animationSpeed);
} else {
this.hide();
this.updateDom(animationSpeed);
}
The module will appear if there is initially items in the list. If I remove all items from the list, the module will “hide”. But if I add items to the server where the json is pulled, the module will not reappear.
I’m guessing I don’t understand what all hide() does?
Thank you for any guidance.