@edwardsmarkff

@edwardsmarkff

Forum Replies Created

Viewing 7 posts - 46 through 52 (of 52 total)
  • Author
    Posts
  • in reply to: disable combobox dropdown button #103199
    edwardsmarkff
    Participant

    disregard last message please – i am going to try to see if i can get a “count” first and then try out your EXCELLENT RECOMMENDATION of using the “smart-input” instead of “smart-combo-box” when there are no line items.

    thank you.

    in reply to: disable combobox dropdown button #103191
    edwardsmarkff
    Participant

    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
    . . . . . . . . }
    . . . . }
    }

     

     

    in reply to: auto-complete=”none” does not appear to work? #103115
    edwardsmarkff
    Participant

    please try both of these, just enter “a” and return in both comboBoxes:

    https://codepen.io/edwardsmarkf/pen/rNpExgO

    auto-complete="none" does not seem to do anything since it still finds “Affrogato” but incremental-search-mode='equals' seems to work fine.

    please let me know if i am not understanding what auto-complete does.  i just assumed that saying “none” would just turn it off completely…?

    in reply to: auto-complete=”none” does not appear to work? #103114
    edwardsmarkff
    Participant

    actually that is not quite true – again please, try entering just the letter “a” and hit the return key, it fills in with the coffee name “Affrogato” – i had hoped to suppress the auto-fill completely.

    however i did find an easy workaround:  incremental-search-mode='equals' creates the desired behavior.

    in reply to: limiting combobox size #103110
    edwardsmarkff
    Participant

    >>> “Only as a temporary workaround such code could be used.”

    does this mean the option may become available?

    • This reply was modified 4 years, 7 months ago by edwardsmarkff.
    in reply to: limiting combobox size #103099
    edwardsmarkff
    Participant

    ok thanks – is this the best way to limit the number of characters in a combo-box?

    https://codepen.io/edwardsmarkf/pen/mdpogEL

    window.onload = () => {
    . . for ( let results in document.getElementById(“my-smart-combo-box”).getElementsByTagName(‘INPUT’) )
    . . {
    . . . . let tmp = document.getElementById(“my-smart-combo-box”).getElementsByTagName(‘INPUT’)[results] ;
    . . . . if ( (typeof tmp == ‘object’) && tmp.getAttribute(‘class’) == ‘smart-input’)
    . . . . {
    . . . . . . . . tmp.setAttribute(‘maxlength’, ‘3’);
    . . . . . . . . break;
    . . . . }
    . .  }
    }

     

     

    in reply to: smart.editor customization question #102468
    edwardsmarkff
    Participant

    sorry – found it (right under my nose)

    https://www.htmlelements.com/demos/editor/toolbar-custom-items/

    apologies for missing this.

Viewing 7 posts - 46 through 52 (of 52 total)