Skip to content

Commit 5d0ac02

Browse files
Merge pull request #3816 from hSaria/3815-select2-width
Fixes #3815: Select2 width handling via theme
2 parents fc5d07b + cfa078c commit 5d0ac02

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

netbox/project-static/js/forms.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,16 @@ $(document).ready(function() {
103103
placeholder: "---------",
104104
theme: "bootstrap",
105105
templateResult: colorPickerClassCopy,
106-
templateSelection: colorPickerClassCopy
106+
templateSelection: colorPickerClassCopy,
107+
width: "off"
107108
});
108109

109110
// Static choice selection
110111
$('.netbox-select2-static').select2({
111112
allowClear: true,
112113
placeholder: "---------",
113-
theme: "bootstrap"
114+
theme: "bootstrap",
115+
width: "off"
114116
});
115117

116118
// API backed selection
@@ -120,6 +122,7 @@ $(document).ready(function() {
120122
allowClear: true,
121123
placeholder: "---------",
122124
theme: "bootstrap",
125+
width: "off",
123126
ajax: {
124127
delay: 500,
125128

@@ -299,7 +302,8 @@ $(document).ready(function() {
299302
multiple: true,
300303
allowClear: true,
301304
placeholder: "Tags",
302-
305+
theme: "bootstrap",
306+
width: "off",
303307
ajax: {
304308
delay: 250,
305309
url: netbox_api_path + "extras/tags/",

0 commit comments

Comments
 (0)