Select to view content in your preferred language

Code changes to the existing widget

728
6
Jump to solution
09-17-2024 06:46 AM
Labels (1)
vijaybadugu
Frequent Contributor

I created an app from developer version of ArcGIS EXB 1.15 , downloaded zip file to the local drive. I just wanted to modify the code of existing widgets, it is a compiled code. is there a way to modify the code to add customizations to the existing downloaded widgets?

0 Kudos
1 Solution

Accepted Solutions
Marshal
Frequent Contributor

This is an issue when customizing the List widget specifically.  See the comments in post below for resolution.

https://community.esri.com/t5/arcgis-experience-builder-questions/select-feature-on-map-click-instea...

View solution in original post

0 Kudos
6 Replies
Marshal
Frequent Contributor

Adding custom widgets is done before exporting the app as a zip.  Workflow would be something like below.

1)  Copy the folder for the widget you want to modify from client\dist\widgets into your-extensions\widgets

2)  Rename folder to your desired widget name

2)  Update manifest.json to reflect the folder name in "name" and "label" attributes (I think only "name" is required, but I always change both)

3)  Modify the files as needed in your new custom widget folder

3)  Run npm start on the client folder to compile custom widget

4)  Add and configure the customized widget in ExB.  It will be at the bottom of the Insert Widgets list under Custom.

5)  Export the application as zip and deploy

0 Kudos
vijaybadugu
Frequent Contributor

Thanks Marshal. 

0 Kudos
vijaybadugu
Frequent Contributor

I copied the list widget to your-extensions, I am getting the below error 

ERROR in ./your-extensions/widgets/list-custom/src/runtime/widget.tsx 19:0-64
Module not found: Error: Can't resolve 'jimu-ui/advanced/link-container'. do I need to install or change the path of it ?

0 Kudos
Marshal
Frequent Contributor

This is an issue when customizing the List widget specifically.  See the comments in post below for resolution.

https://community.esri.com/t5/arcgis-experience-builder-questions/select-feature-on-map-click-instea...

0 Kudos
vijaybadugu
Frequent Contributor

I was able to resolve the issue. if some thing changes on the screen of list widget (adding buttons, text elements),  how it would reflect same in VSCode ?

0 Kudos
Marshal
Frequent Contributor

Glad you got it working!  I am not sure exactly what you mean, but it sounds like a more specific question about modifying the list widget.

In that case, I'd recommend accepting the solution on this question so that others can reference in the future.  Then starting a new question with more appropriate title and specifics regarding what you are trying to accomplish with the list widget.  You will likely get more support for your goal in that way (I am not an expert developer, so you'll get outside my skill level pretty fast!).

0 Kudos