jccartwright / exb-widgets

sandbox for custom widgets to be used in ArcGIS Experience Builder
0 stars 1 forks source link

DataRecordsSelectionChange message only contains one of two features found #10

Closed jccartwright closed 2 years ago

jccartwright commented 2 years ago

When I have two layers visible and a mouse click retrieves a feature from each layer (i.e. popup shows 2 features), the DataRecordsSelectionChange message seems to only include one of the features at a time. Selecting the second feature in the popup causes a third message containing the corresponding feature displayed in the popup.

Is this the expected behavior? The documentation suggests that multiple features might be contained in the message.

Less important, but curious is why two messages are received in response to the first mouse click - one with zero results, and a second containing one of the identified features.

Screen Shot 2022-09-01 at 4 39 48 PM
shawnmgoulet commented 2 years ago

As the documentation states, the properties of the message include DataRecord[], which includes the records. I would have expected the message to include DataRecordSet instead, but regardless, looking through the code for the OOTB map widget, it's not clear if the DataRecordsSelectionChange message is even published as searching through it's code doesn't clarify it:

I do not see a DatRecordsSelectionChange message being published in these, so it's not clear to me it's even available from the Map widget. image

These are related to some actions. Again, not clear the message is being published via a record change within the map here. image

I will have to clarify with Experience Builder team unless you see something differently.

jccartwright commented 2 years ago

Just based on what I'm seeing w/in the subscriber-demo action handler, it seems pretty clear that the map is publishing a DataRecordsSelectionChange message. I can give you a very quick demo this afternoon if you like.