How to highlight the selected item at list?

Hi,

My app shows list of items at List style collection. When I click on one of the items at list, the app will display detail screen for this item. When I click back to list of items screen, how to highlight the item that I click before?

Please assist. Thank you.

You’d need to add an action step to save the rowID of the item you clicked to another column (perhaps in the user table) using a set column action. Then, style the line with an icon or color or perhaps CSS if the record ID matches what was saved.

3 Likes

You can use Robert’s idea with a variation of this CSS method. You may use the custom collection layout.

  • Set the rowID of the selected item to a user’s table column.
  • Add a component to the custom component level.
  • Set a class name for the component (e.g., “highlight-item”).
  • Set the component’s visibility condition to be only visible when item’s rowID matches the “viewing rowID”.
  • Apply CSS styling from the provided link to create the highlight effect.
1 Like

Or, you can use a custom AI Component to trigger an action on screen mounted :

You can make the AI prompt simple. I actually were able to simplify my prompt even more. Just ask to run an action on component mount after x ms.

1 Like

I managed to resolve the issue with yours given solutions.

Thank you all. :slight_smile:

2 Likes