Giving Dropdown items an Id

UI Components for React
Post Reply
Jens_M
Posts: 1
Joined: 22 Apr 2020, 09:28

22 Apr 2020, 10:08

I have a dropdown, which i can easily give an id with the "id" properties. But i also want to give all the items in the dropdown an id.

I havent found anything for this on google/this forum. Is there a way?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

30 Apr 2020, 05:12

I think you can use itemTemplate property. Please see our Advanced dropdown; https://www.primefaces.org/primereact/s ... #/dropdown

Code: Select all

carTemplate(option) {
    ...
   return (
       <div id={option.id} ...
   )
}

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests