diff --git a/docs/release-notes/version-2.6.md b/docs/release-notes/version-2.6.md index 4e26ffab4..e175dc919 100644 --- a/docs/release-notes/version-2.6.md +++ b/docs/release-notes/version-2.6.md @@ -8,6 +8,7 @@ * [#3705](https://github.com/netbox-community/netbox/issues/3705) - Provide request context when executing custom scripts * [#3762](https://github.com/netbox-community/netbox/issues/3762) - Add date/time picker widgets * [#3788](https://github.com/netbox-community/netbox/issues/3788) - Enable partial search for inventory items +* [#3812](https://github.com/netbox-community/netbox/issues/3812) - Optimize size of pages containing a dynamic selection field ## Bug Fixes diff --git a/netbox/utilities/forms.py b/netbox/utilities/forms.py index 44d76186d..eeee719ae 100644 --- a/netbox/utilities/forms.py +++ b/netbox/utilities/forms.py @@ -285,6 +285,8 @@ class APISelect(SelectWithDisabled): name of the query param and the value if the query param's value. :param null_option: If true, include the static null option in the selection list. """ + # Only preload the selected option(s); new options are dynamically displayed and added via the API + template_name = 'widgets/select_api.html' def __init__( self, diff --git a/netbox/utilities/templates/widgets/select_api.html b/netbox/utilities/templates/widgets/select_api.html new file mode 100644 index 000000000..0146a31ff --- /dev/null +++ b/netbox/utilities/templates/widgets/select_api.html @@ -0,0 +1,5 @@ +