Select2 - Able to Search without Clicking #2506

Closed
opened 2025-12-29 18:19:28 +01:00 by adam · 5 comments
Owner

Originally created by @jvanderaa on GitHub (Apr 10, 2019).

Environment

  • Python version: 3.6
  • NetBox version: 2.5.8

Proposed Functionality

On the select2 front of things, curious if there is a method to allow you to start typing without clicking into the drop down?

Would like to use the tab key to get to the field and then start typing. Just looking to use the mouse as little as possible, but to keep the select2 functionality.

I like the search functionality way better on Select2 and for that reason I can start to click on the drop down.

Previously you could tab say to the Tenant Group, and type out the letters for quick selection, then tab to the Tenant Name and start typing to get the Tenant selected.

Use Case

  • Less movement from keyboard to mouse while entering new device information
  • Consistent movement between fields
  • To keep the functionality of Netbox and to possible use without a mouse

Database Changes

I don't know of any

External Dependencies

  • Unsure
Originally created by @jvanderaa on GitHub (Apr 10, 2019). <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6 * NetBox version: 2.5.8 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality On the select2 front of things, curious if there is a method to allow you to start typing without clicking into the drop down? Would like to use the tab key to get to the field and then start typing. Just looking to use the mouse as little as possible, but to keep the select2 functionality. I like the search functionality way better on Select2 and for that reason I can start to click on the drop down. Previously you could tab say to the Tenant Group, and type out the letters for quick selection, then tab to the Tenant Name and start typing to get the Tenant selected. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case - Less movement from keyboard to mouse while entering new device information - Consistent movement between fields - To keep the functionality of Netbox and to possible use without a mouse <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes I don't know of any <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies - Unsure
adam closed this issue 2025-12-29 18:19:28 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 2, 2019):

I assume this is a limitation of the Select2 package, so I'm going to close this out. If someone can dig into it and prescribe a specific change that we can make to accommodate the requested functionality, I'll be happy to reopen this.

@jeremystretch commented on GitHub (May 2, 2019): I assume this is a limitation of the Select2 package, so I'm going to close this out. If someone can dig into it and prescribe a specific change that we can make to accommodate the requested functionality, I'll be happy to reopen this.
Author
Owner

@DanSheps commented on GitHub (May 3, 2019):

@jeremystretch Looks like SO has a nice solution we might be able to piggy back on (second solution):

https://stackoverflow.com/questions/32728774/how-to-focus-select2-pressing-enter-key

This has also been a pet-peeve of mine. I can dig into this more.

@DanSheps commented on GitHub (May 3, 2019): @jeremystretch Looks like SO has a nice solution we might be able to piggy back on (second solution): https://stackoverflow.com/questions/32728774/how-to-focus-select2-pressing-enter-key This has also been a pet-peeve of mine. I can dig into this more.
Author
Owner

@jeremystretch commented on GitHub (May 3, 2019):

Re-opening this to allow further exploration, but let's bear in mind the value-to-effort ratio: I don't want to introduce a hundred lines of Javascript that we must maintain in perpetuity just to save a mouse click.

@jeremystretch commented on GitHub (May 3, 2019): Re-opening this to allow further exploration, but let's bear in mind the value-to-effort ratio: I don't want to introduce a hundred lines of Javascript that we must maintain in perpetuity just to save a mouse click.
Author
Owner

@jvanderaa commented on GitHub (Jul 18, 2019):

I think I have found a work around on the Click2, that probably satisfies this. If you highlight the field you are on, press [enter] and it will bring up the search. @DanSheps - so maybe a user education piece on Select2 more than anything else.

@jvanderaa commented on GitHub (Jul 18, 2019): I think I have found a work around on the Click2, that probably satisfies this. If you highlight the field you are on, press [enter] and it will bring up the search. @DanSheps - so maybe a user education piece on Select2 more than anything else.
Author
Owner

@DanSheps commented on GitHub (Sep 13, 2019):

Testing in the latest build, you no longer need to press enter to start searching. I am going to close this out for now.

@DanSheps commented on GitHub (Sep 13, 2019): Testing in the latest build, you no longer need to press enter to start searching. I am going to close this out for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2506