Pattern matching on datatable active cell


I making a page with on the left a datatable, and on the right a map (dash-leaflet). The data from the table is represented in on the map, as markers.

I would like to make some kind of functionality that when I click/select a cell in the datatable, the marker is changed of color, or something similar.

The markers have an id, corresponding with the row ids in the table.

So I figured I had to use pattern matching, on the id.
Input: active cell - row_id, output id of the marker.

But I’m unsure how I can implement the row_id as an input?

INPUT({'type': ?, 'index': MATCH}, id),
OUTPUT({'type': 'marker', 'index': MATCH}, icon
def ...

Any tips?

Hi @ilpepe4

You don’t need to use pattern matching for this. You can see an example of something similar here: Button inside a Dash Table - #5 by AnnMarieW

That looks really cool.

However, I would like to change a marker (dash leaflet) with an idea to be changed. I would like to avoid remaking the whole markerlayer.

Isn’t there a way to use the row_id and use that to change a certain object (marker) with a same id? of e.g. color?