2 Replies Latest reply on Oct 7, 2019 4:42 PM by 3137215

    how to set title attribute for options in select many component


      Hi, I am using the oj-select-many component with the options binding with an observable array. I need to set the 'title' attribute for each option rendered in the UI (from the options array) to display the long title as tooltip when the text is longer is than the available width.

      The html code:

                <oj-select-many id="select" options="[[browsers]]"  value="{{selectVal}}" style="max-width:20em">


      I am not sure how to set the title attribute for the options which is going to be rendered when the user clicks on the browsers dropdown. Each option in the observable array 'browsers' is rendered with a 'div' inside a 'li' element. I tried to set the 'title' attribute for those div elements but they are not present when the page that contains the oj-select-many component, loads. I am not finding any event which gets triggered before the options dropdown is displayed. So how do i set the 'title' attribute for every option in the select-many dropdown?