[PR #15080] [MERGED] Closes #14917: Replace slim-select with tom-select #14519

Closed
opened 2025-12-29 23:24:56 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15080
Author: @jeremystretch
Created: 2/7/2024
Status: Merged
Merged: 2/8/2024
Merged by: @jeremystretch

Base: featureHead: 14917-tom-select


📝 Commits (10+)

  • 6fec62e Experimenting
  • c4eed67 Remove testing resources
  • 5ca7984 Replace ApiSelect with TomSelect
  • 93ad822 Add color support
  • 1400065 Add clear button
  • 35966cb Clear cached options when searching dynamic selects
  • 36824d1 Add support for static parameters
  • 04c6083 Refactor TomSelect implementation
  • edc9aaf Add dynamic parameter support
  • ebd4a31 Limit number of options to 100

📊 Changes

32 files changed (+771 additions, -1505 deletions)

View changed files

📝 netbox/core/forms/filtersets.py (+1 -4)
📝 netbox/dcim/forms/filtersets.py (+6 -14)
📝 netbox/extras/forms/filtersets.py (+3 -10)
📝 netbox/project-static/dist/netbox.css (+1 -1)
📝 netbox/project-static/dist/netbox.js (+8 -15)
📝 netbox/project-static/dist/netbox.js.map (+2 -2)
📝 netbox/project-static/package-lock.json (+30 -0)
📝 netbox/project-static/package.json (+2 -2)
📝 netbox/project-static/src/htmx.ts (+2 -2)
📝 netbox/project-static/src/index.ts (+1 -0)
📝 netbox/project-static/src/netbox.ts (+2 -2)
netbox/project-static/src/select/api/apiSelect.ts (+0 -1002)
netbox/project-static/src/select/api/index.ts (+0 -10)
netbox/project-static/src/select/api/types.ts (+0 -199)
📝 netbox/project-static/src/select/classes/dynamicParamsMap.ts (+2 -2)
netbox/project-static/src/select/classes/dynamicTomSelect.ts (+305 -0)
netbox/project-static/src/select/color.ts (+0 -82)
netbox/project-static/src/select/config.ts (+9 -0)
netbox/project-static/src/select/dynamic.ts (+51 -0)
📝 netbox/project-static/src/select/index.ts (+6 -7)

...and 12 more files

📄 Description

Fixes: #14917

  • Drop slim-select as a dependency & introduce tom-select
  • Port custom functionality from legacy APISelect to TomSelect

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15080 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/7/2024 **Status:** ✅ Merged **Merged:** 2/8/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `14917-tom-select` --- ### 📝 Commits (10+) - [`6fec62e`](https://github.com/netbox-community/netbox/commit/6fec62edc67db6644f649bde179ef4b3b427d213) Experimenting - [`c4eed67`](https://github.com/netbox-community/netbox/commit/c4eed67bf35b3b4da1b231af38940d810e555c36) Remove testing resources - [`5ca7984`](https://github.com/netbox-community/netbox/commit/5ca798429e03e47fe1e9362dab63e6748df94278) Replace ApiSelect with TomSelect - [`93ad822`](https://github.com/netbox-community/netbox/commit/93ad822b772d251f3c4c4d17f844277a15ee7b01) Add color support - [`1400065`](https://github.com/netbox-community/netbox/commit/140006521694715c811eb5d13598d393d2d6d594) Add clear button - [`35966cb`](https://github.com/netbox-community/netbox/commit/35966cb988507491bbd3dc993b1eb245ed5e1673) Clear cached options when searching dynamic selects - [`36824d1`](https://github.com/netbox-community/netbox/commit/36824d16e05bc2c4068e7adcf7b779b870d71a04) Add support for static parameters - [`04c6083`](https://github.com/netbox-community/netbox/commit/04c6083ff6bb72ef5413abcc90b141913782270b) Refactor TomSelect implementation - [`edc9aaf`](https://github.com/netbox-community/netbox/commit/edc9aaf53d58b67b465a8ab94b35aeef6b5714d2) Add dynamic parameter support - [`ebd4a31`](https://github.com/netbox-community/netbox/commit/ebd4a316c0c06b26830ea94e2dab11550e3f29be) Limit number of options to 100 ### 📊 Changes **32 files changed** (+771 additions, -1505 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/forms/filtersets.py` (+1 -4) 📝 `netbox/dcim/forms/filtersets.py` (+6 -14) 📝 `netbox/extras/forms/filtersets.py` (+3 -10) 📝 `netbox/project-static/dist/netbox.css` (+1 -1) 📝 `netbox/project-static/dist/netbox.js` (+8 -15) 📝 `netbox/project-static/dist/netbox.js.map` (+2 -2) 📝 `netbox/project-static/package-lock.json` (+30 -0) 📝 `netbox/project-static/package.json` (+2 -2) 📝 `netbox/project-static/src/htmx.ts` (+2 -2) 📝 `netbox/project-static/src/index.ts` (+1 -0) 📝 `netbox/project-static/src/netbox.ts` (+2 -2) ➖ `netbox/project-static/src/select/api/apiSelect.ts` (+0 -1002) ➖ `netbox/project-static/src/select/api/index.ts` (+0 -10) ➖ `netbox/project-static/src/select/api/types.ts` (+0 -199) 📝 `netbox/project-static/src/select/classes/dynamicParamsMap.ts` (+2 -2) ➕ `netbox/project-static/src/select/classes/dynamicTomSelect.ts` (+305 -0) ➖ `netbox/project-static/src/select/color.ts` (+0 -82) ➕ `netbox/project-static/src/select/config.ts` (+9 -0) ➕ `netbox/project-static/src/select/dynamic.ts` (+51 -0) 📝 `netbox/project-static/src/select/index.ts` (+6 -7) _...and 12 more files_ </details> ### 📄 Description ### Fixes: #14917 - Drop `slim-select` as a dependency & introduce `tom-select` - Port custom functionality from legacy APISelect to TomSelect --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:24:56 +01:00
adam closed this issue 2025-12-29 23:24:56 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14519