Decrease live search minimum characters #2145

Closed
opened 2025-12-29 17:22:39 +01:00 by adam · 3 comments
Owner

Originally created by @candlerb on GitHub (Nov 27, 2018).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.5-beta2

Steps to Reproduce

  • Create device type "patch-24-rj45"
    • Add one rear port called "backplane", 8P8C
    • Add 24 front ports [1-24], linked to backplane:1 to backplane:24
  • Create device role "patch panel"
  • Create "PP1" in rack position U48, with this role and device type
  • Create "PP2" in rack position U47, with this role and device type
  • While PP2 is open, click the 'connect' icon next to its "backplane" rear port
  • Try to search for the corresponding "backplane" port on PP1

Expected Behavior

After entering "PP1" in the Device, and selecting "Rear Port" from the type, the port "backplane" would appear in the Name field.

Observed Behavior

The "backplane" port did not appear.

image

Workaround

Use the alternative way of selecting the partner device, by following the hierarchy of site-rack-device.

image

Originally created by @candlerb on GitHub (Nov 27, 2018). ### Environment * Python version: 3.5.2 * NetBox version: 2.5-beta2 ### Steps to Reproduce * Create device type "patch-24-rj45" * Add one rear port called "backplane", 8P8C * Add 24 front ports `[1-24]`, linked to `backplane:1` to `backplane:24` * Create device role "patch panel" * Create "PP1" in rack position U48, with this role and device type * Create "PP2" in rack position U47, with this role and device type * While PP2 is open, click the 'connect' icon next to its "backplane" rear port * Try to search for the corresponding "backplane" port on PP1 ### Expected Behavior After entering "PP1" in the Device, and selecting "Rear Port" from the type, the port "backplane" would appear in the Name field. ### Observed Behavior The "backplane" port did not appear. ![image](https://user-images.githubusercontent.com/44789/49073830-3a464780-f22b-11e8-9ad5-ab3c24f0704f.png) ### Workaround Use the alternative way of selecting the partner device, by following the hierarchy of site-rack-device. ![image](https://user-images.githubusercontent.com/44789/49074037-be003400-f22b-11e8-9561-bb8987b80593.png)
adam added the type: bugstatus: accepted labels 2025-12-29 17:22:39 +01:00
adam closed this issue 2025-12-29 17:22:40 +01:00
Author
Owner

@candlerb commented on GitHub (Nov 27, 2018):

Update: if I change the names of the devices to "PAN1" and "PAN2", and after typing PAN1 I wait for it to pop up in the drop down and select it from there, it works.

Hence it seems to be because the name search doesn't kick in until 4 characters have been typed.

@candlerb commented on GitHub (Nov 27, 2018): Update: if I change the names of the devices to "PAN1" and "PAN2", *and* after typing PAN1 I wait for it to pop up in the drop down and select it from there, it works. Hence it seems to be because the name search doesn't kick in until 4 characters have been typed.
Author
Owner

@jeremystretch commented on GitHub (Nov 27, 2018):

Correct. The livesearch widget currently requires a minimum of four characters before it will initiate an API request to populate selection list. I'm okay with reducing this to three, but any fewer is probably going to be more of an annoyance.

@jeremystretch commented on GitHub (Nov 27, 2018): Correct. The livesearch widget currently requires a minimum of four characters before it will initiate an API request to populate selection list. I'm okay with reducing this to three, but any fewer is probably going to be more of an annoyance.
Author
Owner

@jeremystretch commented on GitHub (Nov 27, 2018):

FYI this was pushed to develop since it's not pertinent specifically to the beta.

@jeremystretch commented on GitHub (Nov 27, 2018): FYI this was pushed to `develop` since it's not pertinent specifically to the beta.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2145