Skip to content

2026.5.2

Choose a tag to compare

@JackAtOmenApps JackAtOmenApps released this 14 May 22:46
· 36 commits to main since this release

Full Changelog: 2026.5.1...2026.5.2

New: cross-level filtering in nested formsets

FilterSpec now takes a levels_up argument:

FilterSpec(source="customer", lookup="id", source_type="field", levels_up=1)

This lets a select inside an inner formset row pull its filter value from a field on the outer parent row. levels_up=0 (the default) is the original same-row behavior, so existing configs aren't affected. Only valid on source_type="field". See docs/api/config.md for the full writeup.

If existing projects override tomselect.html

A few things were changed:

  • resetTomSelectState now takes one argument: (tomSelect). It reads originalFirstUrl and the reset-flag name off tomSelect.settings.
  • Per-instance state lives on the TomSelect instance: this._previousQuery, this._currentLoadController. The old IIFE-scoped previousQuery and currentLoadController are gone - they were the source of cross-row leaks in formsets.
  • The config now ships settings.resetVarName and settings.originalFirstUrl, and shouldLoad / load / reset all consume them.
  • onItemAdd, onItemRemove, onDropdownOpen, onDropdownClose use this.input instead of the closure-captured element so cloned rows target their own select.
  • The dead {% if 'render' in widget.attrs.keys ... %} block at the bottom of the template was removed. It had been unreachable since render is popped from attrs before render.