Commit 9b70193
fix: show display labels in Select triggers instead of raw values (#167)
* fix: show display labels in Select triggers instead of raw values
@base-ui/react Select.Value does not auto-mirror SelectItem text the way
Radix UI does — it renders the raw value string. Resolve the label
explicitly and pass it as children so ActivityScopeFilter (__standalone__,
__all__, activity name), FilterSelect (regular, __all__), and FilterBar
all display human-readable text.
Fixes display in shop, check-in, task, banner, lottery filter bars.
https://claude.ai/code/session_01NjUj8jpfA6rBuCYzqKaZmD
* fix: add keepMounted to SelectContent so Select.Value auto-mirrors labels
Without keepMounted, SelectItem children (and their ItemText registrations)
are unmounted when the popup is closed. On initial render with a programmatic
value, no items have ever mounted, so Select.Value falls back to showing the
raw value string.
keepMounted keeps items always mounted in the background, giving Select.Value
access to every option's label at all times — fixes all remaining raw-value
display issues across the codebase without touching individual callsites.
https://claude.ai/code/session_01NjUj8jpfA6rBuCYzqKaZmD
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7f55b5d commit 9b70193
4 files changed
Lines changed: 19 additions & 5 deletions
File tree
- apps/admin/src
- components
- activity
- patterns
- ui
- routes/_dashboard/o.$orgSlug/p.$projectSlug/shop
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| |||
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
58 | | - | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
74 | | - | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
87 | | - | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
331 | | - | |
| 332 | + | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| |||
0 commit comments