Commit e215ea2
committed
feat: add disabled items support in multiselect
Sometimes it's nice to show a user a list of options, some of which the
user cannot interact with.
e.g. A list of linux users on this machine to import to a new machine, I
would like to show root but without allowing the user to deselect it.
Current implementation limitations:
- No theme support - there's no indication that an item is disabled
until the user attempts to interact with it. Would adding such visual
indication be a good idea from a compatibility perspective? Are themes
all built-in or possibly user defined?
- Cannot dynamically add items with a different disabled state. This
would require modifying the signature of e.g. `item_checked` which
would be a breaking change. I could also add a new method but I wasn't
sure if it's worth it.
- No tests
- No documentation
Do you think this is a desired feature? If so, I can work on improving
the limitations. Should this maybe be a separate widget altogether?1 parent 6244c77 commit e215ea2
1 file changed
+39
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
| |||
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
| 110 | + | |
| 111 | + | |
100 | 112 | | |
101 | 113 | | |
102 | 114 | | |
| |||
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
| 133 | + | |
| 134 | + | |
121 | 135 | | |
122 | 136 | | |
123 | 137 | | |
| |||
229 | 243 | | |
230 | 244 | | |
231 | 245 | | |
| 246 | + | |
232 | 247 | | |
233 | 248 | | |
234 | 249 | | |
| |||
277 | 292 | | |
278 | 293 | | |
279 | 294 | | |
280 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
281 | 298 | | |
282 | 299 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
287 | 315 | | |
288 | 316 | | |
289 | 317 | | |
| |||
367 | 395 | | |
368 | 396 | | |
369 | 397 | | |
| 398 | + | |
370 | 399 | | |
371 | 400 | | |
372 | 401 | | |
| |||
0 commit comments