Skip to content

Commit a75dee7

Browse files
committed
Enable drag-and-drop of items within multiselect fields
1 parent 24c6653 commit a75dee7

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

netbox/project-static/dist/netbox.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/dist/netbox.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/src/select/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ export function getPlugins(element: HTMLSelectElement): object {
2020
};
2121
}
2222

23+
// Enable drag-and-drop reordering of items on multi-select fields
24+
if (element.hasAttribute('multiple')) {
25+
plugins.drag_drop = {};
26+
}
27+
2328
return {
2429
plugins: plugins,
2530
};

0 commit comments

Comments
 (0)