Commit 44a3fcd
committed
Fix: Load dropdown items dynamically and mark current selection
Dynamic Loading:
- Uses actual vocabulary size from pageInfo.totalElements
- Caps at 200 items to prevent loading huge vocabularies
- Performance scaled: 50 items (Good UX), 100 items (Acceptable), 200 items (Borderline)
Selection Highlighting:
- Highlight current value when menu opens (setSelectedIndexToCurrentValue)
- Treat 'Clear selection' as index 0, adjust item indices (i+1)
- Arrow key navigation respects clear item (totalItems)
- Enter selects correct item or clears when index = 0
- Skip disabled items in scrollToSelected
- Selected items now highlighted correctly up to position 200# This is the 1st commit message:1 parent c2258bf commit 44a3fcd
2 files changed
Lines changed: 52 additions & 9 deletions
File tree
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
Lines changed: 50 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
| |||
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
188 | | - | |
189 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
193 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
194 | 230 | | |
| 231 | + | |
| 232 | + | |
195 | 233 | | |
196 | | - | |
| 234 | + | |
197 | 235 | | |
198 | 236 | | |
199 | 237 | | |
200 | 238 | | |
201 | 239 | | |
202 | 240 | | |
203 | 241 | | |
204 | | - | |
| 242 | + | |
205 | 243 | | |
206 | 244 | | |
207 | | - | |
| 245 | + | |
208 | 246 | | |
209 | 247 | | |
210 | 248 | | |
| |||
220 | 258 | | |
221 | 259 | | |
222 | 260 | | |
223 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
224 | 266 | | |
225 | 267 | | |
226 | 268 | | |
| |||
0 commit comments