componentId = ‘CompentId’
c = skuid.runtime.getPage(‘Questionnaire_v2’).component.getById(componentId);
in v1 I could c.unrender(), etc. but how do I do that in v2?
In my case I want to disable/unrender modal component from JS.
componentId = ‘CompentId’
c = skuid.runtime.getPage(‘Questionnaire_v2’).component.getById(componentId);
in v1 I could c.unrender(), etc. but how do I do that in v2?
In my case I want to disable/unrender modal component from JS.
Best answer by annajosephine
Hi @lukaspovilonis, someone from the team was able to review your code and here’s what you can use to render the table inside the wrapper:
let wrapperId = 'wrapperTable';
let strXmlTable = `<skuid__table allowColumnFreezing="dragDrop" model="UIModel" uniqueid="sk-NAL-5813" mode="read">
<fields>
<field id="Field1" uniqueid="fi-NAP-7426"/>
<field id="Field2" uniqueid="fi-NAP-7427"/>
</fields>
<filtering enableSearch="false"/>
<rowActions/>
<massActions/>
</skuid__table>`;xmlDef = skuid.utils.makeXMLDoc(strXmlTable);var wrapperComponent = skuid.$C(wrapperId);wrapperComponent.set({
components: [
xmlDef,
]
});
the only thing that was changed was the last part of your code
var wrapperComponent = skuid.$C(wrapperId);
wrapperComponent.set({
components: [
xmlDef,
]
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.