Pattern-matching callbacks: can one input use ALL when others (and outputs) use MATCH?

Hi,

In a callback, I’d like to define the following input/output:

    [
        Output({"type": APP_ACTION_BUTTON_TYPE, "id": MATCH}, "children"),
        Output({"type": APP_ACTION_BUTTON_TYPE, "id": MATCH}, "title"),
    [
        Input({"type": APP_ACTION_SELECTED_CHECKBOX_TYPE, "id": ALL}, "data"),
        Input({"type": APP_ACTION_SELECTED_ALL_ITEMS_TYPE, "id": MATCH}, "data"),
    ],

My expectation is to get one value for the second input and all of them (a list) for the first input (the 2 inputs don’t share the same IDs).. It works well (the callback is fired with the expected values) if the second input is modified (the input with MATCH) but the callback is not fired if the first input (the one with ALL is modified. If modify the second input after modifying the first one (that didn’t trigger the execution of the callback), I can see in the list that the first input has been modified).

I don’t have this problem if MATCH is replaced by a string matching one of the expected id) but it is rather unexpected for me. Both input are ddc.Store but I don’t think it is really relevant…

Thanks in advance for any hint! Best regards,

Michel

PS : I read Pattern-matching callbacks: can you combine MATCH and ALL? but it is a different topic as it was about using MATCH and ALL in the same input

Hi @jouvin.

Why don’t you use ALL in the second Input too and parse which index triggered the callback?

Along this lines:

1 Like