Get data in pluggable widgets

0
  Hi,  in my pluggable widget I am using a datasource property and a widget to access my section data. That works fine. <property key="sections" type="datasource" isList="true" required="true"> <caption>Sections</caption> <description>Sections to show</description> </property> <property key="widgetSections" type="widgets" dataSource="sections" required="false"> <caption>Content</caption> <description>Widgets using data source</description> </property> <property key="sectionName" type="attribute" dataSource="sections" required="false"> <caption>Name attribute</caption> <description>Section name</description> <attributeTypes> <attributeType name="String"/> </attributeTypes> </property> I now added a list view inside my widget and would like to access this in my code.  When using this.props.widgetSections.get(section) I can see that the browser logs the listView but I don’t know how I can get access to the items. Can anyone help me here how I can access the data or how to get access to nested widgets in pluggable widgets?
asked
1 answers
1

I could be wrong but I don’t think you can access the listview besides for where to place it (I’m actually surprised the listview works inside the widget property; I thought only React widget worked). What are you trying to do with the listview? If you’re trying to get information from the child component to the parent component, you might need to use React Contexts which would require the child component to be custom made (see source code for Mendix’s Gallery and DatagridTextFilter widgets at github.com/mendix/widget-resources/src/packages/pluggableWidgets…I think)

answered