Event handlers for mapped options

The documentation states that we can set event handlers for mapped values in the navigation menu. However, when I attempt to do this, the mapped values do not seem to have the event handler option available. Additionally, the example provided in the documentation shows event handlers for manual options instead of mapped ones.

Am I misunderstanding something, or is this a mistake in the documentation? Can someone guide me on how to set event handlers for mapped values?

You can directly use the dropdown mapped value in event handlers
For example: "I am using a dropdown to get an ID from a query. On clicking that ID, you can run another query to retrieve data associated with it."

image


image

@ZeroCodez How to access ID in the event ?

Use the values from the dropdown, for example, {{ dropdown1.values }}. When you select a value from it, you can get the ID or any other information passed into the dropdown. You can then use this information in the event handlers.

1 Like

image
image


@ZeroCodez In this when i click the menu item nothing change

I finally figured out how to do that. we can access the value using "item".
image

But Documentation example is wrong for mapped value events.

Hi @Rashmika_Lakshan, the doc is definitely showing adding an event handler on a Manual option and not on Mapped options as stated right above. We just created the request to update our doc. Thank you for your feedback! :slightly_smiling_face:

2 Likes

Hi @Paulo,Thank you for the clarification and for taking action to update the documentation. :blush:

1 Like