hello, is there a sample for creating a widget in experience builder that subscribes to selection changed event from other widget like the list widget?
Go into client/dist/widgets/samples/widget-communication and review the publish string and subscribe widget under the src folder. The publish string widget basically uses the publishMessage method to invoke the StringSelectionChangeMessage. Also, review the manifest.json for this widget to see the publish messages. The subscribe widget has the query-action.ts under the actions folder. Also review the manifest,json for the subscribe widget to see how the messageActions array has the name of the message action. If you go into client/dist/experience/configs/config-widget-communication.json you can see how this config will load in your experience builder developer edition. Use https://localhost:3001/experience/?config=configs/config-widget-communication.json or Experience to run this config.json file. This example does not include any UI to configure this action in the settings. You would need to build this if you would like users to setup these actions. I am thinking when we have our next release for 1.1 to create a sample that illustrates this workflow. I just need to think about how to keep it simple enough.
Hi, is there a complete example of this yet? I'm on version 1.4 of ExBuilder, and I don't have the directories that David mentioned.