Custom Node with long drop down

#1

I am working on a custom node that the configuration has a drop down list that is dynamically created.

My issue is that the list has gotten very long and doesn’t have a way to scroll up and down - once it hits a certain length the values on the top get cut off. How can I either add scroll bars to the drop down list or add type ahead to the list box?

Thanks.

0 Likes

#2

Hi @bertmartin

how are you generating the list? what HTML elements are you using?

0 Likes

#3

Sorry for the delay - got busy with something else.

This is the code for building the drop down (getSwitch is the function that builds the dynamic list):

        oneditprepare: function() {
            blist = getSwitch()
			$("#node-config-input-vswitch").typedInput({
                default: this.vswitch,
                types:blist  
			});

Here is the HTML:

	<div class="form-row">
        <label for="node-config-input-vswitch"><i class="icon-tag"></i> Switch</label>
        <input type="text" id="node-config-input-vswitch" placeholder="Switch ID">
	</div>

thanks

0 Likes