Select to view content in your preferred language

Same widget with multiple datasource

288
1
01-12-2024 11:12 AM
Labels (1)
David_RonaldSuárez_Urresti
New Contributor III

I am trying to develop a widget to be used with multiple layers. For example I have a road layer, a building layer and a trees layer, the widget needs to upload files no matter what feature from what layer is selected.

On the setting.tsx I had set to true my isMultiple attribute for the DataSourceSelector. On my runtime widget.tsx I have my DataSourceComponent set as useDataSource={this.props.useDataSources[0]}. This only works for the datasource at position 0. How can I  use the DataSourceComponent for multiple datasource?

 

Best regards,

David

0 Kudos
1 Reply
MohammedHilal_K
New Contributor III

Hi

You need to map the useDataSource in render. 

0 Kudos