It would be great to have the possibility to add event handlers, e.g. on click, to prefix/suffix icons.
Concrete example currently in my mind: I'm building a listview similar to Shopify's interface to add options to a product:
As you can see, they have a suffix icon to delete the row. I know this is achievable with the icon component, but as the text input and other components have prefix and suffix icons, it would be nice if we could have trigger events from those as well.
Thank you for reaching out! You're right—while there are workarounds, I agree that having this feature would be really helpful. I've submitted a request internally to add it to our backlog.
Currently, this feature is only available for TextInput suffix icons in mobile apps:
Hello! I’m in the process of creating a note/chat container and have a specific vision for the layout and design. I recently noticed the elegant use of a combined input field in the AI Chat component, which looks incredibly clean.
Typically, I would place a button next to a text field and call it a day—sometimes even using an icon for the button text. I even went into creating a custom component text field to replicate the look but that takes more time to get up and running. However, with the option to incorporate a prefix or suffix icon that can be activated with a click or by pressing enter, I see a great opportunity for enhanced functionality. I utilize a similar concept in the table component, where we can set a button as an icon within a column and an option like this would definitely be awesome!
Not bad. I’ve used this approach before. It does get the idea across and it works but I was thinking of a native component without a workaround like this. Pretty much gaining access to that chat input field outside of the chat component. I thought of using that component outside of AI but I think it’s mainly used for an AI help bot or other AI use.