vitmalina / w2ui

UI widgets for modern apps. Data table, forms, toolbars, sidebar, tabs, tooltips, popups. All under 120kb (gzipped).
http://w2ui.com
MIT License
2.65k stars 730 forks source link

w2field and the automatic set of width of list (combo) according the most width item #2556

Open jankrnavek opened 2 weeks ago

jankrnavek commented 2 weeks ago

Adding an option to the w2field definition to automatically set the width of the dropdown list or combo according to the most widest item in the list.

https://w2ui.com/web/docs/2.0/form/fields-list

For clarity, I don't want to change the size of the input tag itself, only its dropdown list.

For now I am doing like this bellow, but I affect the position of toolbar tooltips as well.

// width of combo box
.w2ui-overlay {
    width: 400px !important;
}

//  top arrow position
.w2ui-overlay .w2ui-overlay-body::before {
    left: 40px !important;
}