4.x: Communication between custom widgets

798
2
Jump to solution
02-03-2019 02:51 AM
Ranga_Tolapi
Occasional Contributor III

How to make custom widgets (typescript) communicate with each other?

To elaborate, whenever a button clicked on first custom widget it should update a label in the second custom widget (and vice versa).

HTML5, CSS, JavaScript, and JavaScript FrameworksEsri Young Professionals NetworkEsri webmapEsri Technical SupportRene Rubalcava

 arcgis javascript api 4.x typescript #jsx#accessor

0 Kudos
1 Solution

Accepted Solutions
MattDriscoll
Esri Contributor

Hey Ranga Satish Kumar Tolapi

You could have another class that takes in these widgets and handles communication between them. There isn't a defined or suggested way to do this within the API. The custom widgets should just have events or properties that the other widget can listen to in order to update itself.

View solution in original post

2 Replies
MattDriscoll
Esri Contributor

Hey Ranga Satish Kumar Tolapi

You could have another class that takes in these widgets and handles communication between them. There isn't a defined or suggested way to do this within the API. The custom widgets should just have events or properties that the other widget can listen to in order to update itself.

Ranga_Tolapi
Occasional Contributor III

Thank you Matt Driscoll

0 Kudos