KamoCRM

Land the header's Text, Chat and Note buttons on the tab they name

Fixkamo-internal
Shipped
30 ஆகஸ்ட், 2026 அன்று 11:24 PM UTC
Author
Kamo
Commit
faac02e

The lead view keeps its tab selection in the URL — `tab` for the main tab, `commsTab` for the Communications sub-tab — and a header quick action sets both: "Text" means the Communications tab, Texts sub-tab. It did that with two calls, setTab then setCommsTab, and each built its update from the searchParams value its own render had closed over. Back-to-back in one click handler React has not re-rendered in between, so the second was computed from a query string that had never seen the first and, being a replace, wrote over it. Setting commsTab un-set tab, and Text, Chat and Note looked like they did nothing at all. Both params now fold into one navigation through withLeadViewTabs, which is a pure function over the query string and therefore testable without a router. The unsaved-changes guard moves into the single setter with them, so one click asks once rather than once per param it happens to touch.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing