I’m developing a custom pluggable widget (Drawline) that takes a list of OperationMaster objects from a microflow and renders a flow chart based on MasterSortOrder and other fields like Operation_No, Operation_Name, etc.
0
What I Want To Achieve Use a datasource (microflow) in the widget property to get a list of OperationMaster records. Access the items list in Drawline.tsx to render a custom flow chart. ❌ Current Issues I'm Facing operationMasterList not available in .d.ts fileEven after defining it in XML, it disappears every time I build the widget using npm run build. Manually adding to DrawlineProps.d.ts gets removedI tried adding this manually: ts CopyEdit operationMasterList: ListValue<ObjectItem>; But it gets wiped out on every build. Getting this error in TypeScript code: nginx CopyEdit Property 'operationMasterList' does not exist on type 'DrawlineContainerProps' XML Validation Error in Mendix: vbnet CopyEdit Widget XML file 'Drawline.xml' does not conform to the XML schema: The element 'widget' has invalid child element 'dataSource' ⚙️ What I Have Tried So Far Updated my Drawline.xml like this: xml CopyEdit <property key="operationMasterList" type="datasource" required="true"> <caption>Operation Master List</caption> <description>List of operations</description> <dataSourceType>microflow</dataSourceType> <objectType>MyFirstModule.OperationMaster</objectType> </property> Removed the invalid <dataSource> tag that I was previously using directly under <widget>. Cleaned and rebuilt using npm run build. 🧪 Still Facing: After rebuild, the property is still not available in the generated TypeScript props file (DrawlineProps.d.ts). So I'm unable to access .items or render the flow chart. Also not sure if I'm structuring the XML correctly or if Mendix has some special rule for datasource properties in pluggable widgets. ❓ Questions for the Community How do I properly define a list (datasource) in XML so that it appears in the generated .d.ts? Is there a specific format or schema that Mendix expects for datasource properties? What is the correct way to access List Items in the widget TS file (e.g., ObjectItem, .get(), etc.)?