SurfSense/surfsense_web/components/hitl-edit-panel
Matt Van Horn 7f0a5cd06a
fix(hitl-edit-panel): move duplicate-tag check into functional setTags
Fixes #1248

handleAddTag had tags in its useCallback dependency array only so the
closure-level duplicate check could read it, which forced the callback
to re-create on every tag mutation and compared new additions against
a potentially-stale closure value.

Collapse the duplicate check into the functional setTags updater so
the check always runs against the latest state, and drop tags from
the dependency array - the callback is stable for the component's
lifetime and downstream memoization won't get invalidated on every
keystroke.
2026-04-21 01:43:20 -07:00
..
hitl-edit-panel.tsx fix(hitl-edit-panel): move duplicate-tag check into functional setTags 2026-04-21 01:43:20 -07:00