JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › ComboBox › disable combobox dropdown button › Reply To: disable combobox dropdown button
hi Peter – thank you for your reply.
the issue i am facing is that i am creating <span style=”text-decoration: underline;”>dynamic</span> ComboBox elements from a data source, and it is very difficult to determine ahead of time if there are going to be list items or not.
i set up an example here of what i am thinking: https://codepen.io/edwardsmarkf/pen/poayPbg
for ( let tmp in document.getElementsByTagName(‘smart-combo-box’) ) {
. . . if (!isNaN(parseInt(tmp))) {
. . . . . . . . let comboBox = document.getElementsByTagName(‘smart-combo-box’)[tmp] ;
. . . . . . . . if ( !comboBox.items.length) {
. . . . . . . . . . . . comboBox.getElementsByClassName(‘smart-drop-down-button’)[0].style.setProperty(‘display’ , ‘none’ );
. . . . . . . . . . . . // HIDE the drop-down arrows if there are no items to select
. . . . . . . . }
. . . . }
}