PricingSidebar.jsx
4.11 KB
-
🔧 fix(pricing): synchronize group ratio in Table & Card views with sidebar selection · 13da9eb2Problem Choosing a different token-group in the pricing sidebar only updated the filter but did **not** refresh the displayed group ratio in both the Table (`@table/`) and Card (`@card/`) views. The callback used by the sidebar changed `filterGroup` yet left `selectedGroup` untouched, so ratio columns/cards kept showing the previous value. Solution • `PricingSidebar.jsx` – Accept new prop `handleGroupClick` (from `useModelPricingData`). – Forward this callback to `PricingGroups` (`setFilterGroup={handleGroupClick}`) while retaining `setFilterGroup` for reset logic. – Keeps both `filterGroup` filtering and `selectedGroup` state in sync via the single unified handler. Result Switching groups in the sidebar now simultaneously updates: 1. the model list filtering, and 2. the ratio information shown in both pricing Table and Card views. No UI/UX regression; linter passes.t0ng7u committed