Extend selectize field

Hi guys, I try to extend the selectize form field, i need to add a simple class to a selectize-input item or directly in the option of the select but if i try to do that in the “forms/fields/select/select.html.twig”

                        {% if key == value or (field.multiple and selected in value) %}
                        {% endif %}
                        value="{{ item_value }}"
                        {% if grav.twig.twig.filters['tu'] is defined %}
                        {{ text|tu|raw }},{% else %},{{ text|t|raw }},{% endif %}

I always have this result in the html

<option value="20701AA005" selected="selected">20701AA005</option>

the class was erased!

I need to show a different backgroud color based on condition, i’ve alredy write the condition check but i’m unable to add this class.
Anyone have suggestions?

Are you adding forms/fields/select/select.html.twig in your theme?

Also, this is a frontend form, right? Or are you trying to change an Admin field?

hi, I’m sorry for my late reply…
I’m creating a custom administration field, so I’ve created a plug-in. Need to verify the existence of a page and to communicate the outcome of the operation by changing the background color of the selectize saved value.
I managed to do so by adding an custom attribute to the select field (data-itemstatus="") that contain a json object with the response of the check condition and after i process it via javascript to add a custom class to the selectize item… It works whitout problem but i’don’t understand why i can’t do that simply by add a class to the option. I think the problem is in selectize.js??.. If I understand correctly it create the selectize item based to the selected option and can’t keep the class attribute.
PS: In my plug-in i have that path admin hemes\grav emplates\forms\fields and here I put my custom select.html.twig