Live wall filter: preset tags match word starts; keep typed trailing space (#235)
- Storm/Traffic preset tag terms now match at the start of a word, so
"tree" no longer pulls "street-racing"/"street-fight" into Storm mode.
- FilterBar search compared the trimmed hash q against the untrimmed
typed text, so pausing after "main " reset the box to "main" and the
next word ran on ("mainst"). Compare trimmed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f479578942
commit
2aaf474828
@@ -53,7 +53,9 @@ export function FilterBar({
|
||||
const [q, setQ] = useState(filter.q);
|
||||
const committed = useRef(filter.q);
|
||||
useEffect(() => {
|
||||
if (filter.q !== committed.current) { committed.current = filter.q; setQ(filter.q); }
|
||||
// Compare trimmed: the hash stores q trimmed, so a just-typed trailing
|
||||
// space ("main ") must not read as an outside change and get eaten.
|
||||
if (filter.q !== committed.current.trim()) { committed.current = filter.q; setQ(filter.q); }
|
||||
}, [filter.q]);
|
||||
const filterRef = useRef(filter);
|
||||
filterRef.current = filter;
|
||||
|
||||
Reference in New Issue
Block a user