Re: data-icon for option within t:select

2018-11-15 Thread Thiago H. de Paula Figueiredo
Hello, everyone! Great tip by Jens about OptionModel attributes! If you didn't need to have data-attributes, you could style the select options using CSS attribute selectors: option[value="fa-globe"]::before { content: url(url/to/fa-globe/image.png) ... } On Thu, Nov 15, 2018 at 9:37 AM Je

Re: data-icon for option within t:select

2018-11-15 Thread Jens Breitenstein
Hi David/Ben The SelectModelRender makes use of attributes by     ...     writeAttributes(optionModel.getAttributes());     ... And this method is implemented first in "AbstractOptionModel" and returns "null". So as Ben stated just adding the entry     "data-icon" -> "glyphicon glyphicon-eye

Re: data-icon for option within t:select

2018-11-15 Thread Ben Weidig
Hi, as far as I can tell from the code and documentaion the class OptionModel supports additional attributes with its .getAttributes() method. So you should only need to implement your own OptionModel and build your SelectModel with it. Hope this helps. Ben On Thu, Nov 15, 2018 at 7:23 JumpStar

Re: data-icon for option within t:select

2018-11-14 Thread JumpStart
Very good question. I don’t know the answer, but here’s an idea… The Select component does not have a class parameter, but it does render informal parameters. So if you specify class=“selectpicker” then I’d expect it will be rendered with class=“selectpicker”. By default it renders the "select"