Click info for multiple html.Articles

Hi All,

I’m new to dash …

I’m working on an NLP project where I would like to recommend Articles to a user and allow the user to click / select the Article they like the most. So far, I have used html.Article and have created one html.Article per data item, but now here are my questions:

  1. How do i do a pattern matching callback when I don’t know the complete callback name? I don’t understand what the Input should look like:

The callback Id is going to be “id-”+ a string

I do know how to get the changedID once the callback is activated though…

  1. How do I change the state of the object, when I don’t know the ID until after a callback is activated?

Best Regards,

Mike

Hi @robomike, welcome to dash! :slight_smile:

  1. How do i do a pattern matching callback when I don’t know the complete callback name? I don’t understand what the Input should look like: The callback Id is going to be “id-”+ a string

Can you elaborate a bit more on what you mean by “callback name”? I would recommend a careful reading on the “simple example using MATCH/ALL” sections of the docs to get a better idea of how pattern matching callbacks work.

From your second point, it seems that your problem is to identify which element (html.Article) triggers the callback, in order to modify it. The answer would depend a lot on which elements you want to modify (all of them, just the selected) and how, but please take a look on the dash.callback_context section of the docs.

If you add some of your code snippets, I would be happy to suggest something more specific.

Hope that this helps!