Commit 059d68e
authored
fix(showcase): CRM Workbench KPI cards read adapter.find().data not .records (#2632)
The CRM Workbench KPI strip (Total projects / Active) rendered 0 even though the ListView beside it, backed by the same object, showed all rows. useAdapter()'s ObjectStackAdapter.find() normalizes to a QueryResult with a `data` array, not the REST envelope's `records`, so `all.records` always missed and both counts stuck at 0. Read `.data` first with `.records`/array fallbacks. Verified in-browser: cards now show Total 5 / Active 2.1 parent fce8ff4 commit 059d68e
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
0 commit comments