File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
packages/components/src/components/select Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,16 @@ export default function DBSelect(props: DBSelectProps) {
237
237
< For each = { props . options } >
238
238
{ ( option : DBSelectOptionType ) => (
239
239
< >
240
- < Show when = { option . options } >
240
+ < Show
241
+ when = { option . options }
242
+ else = {
243
+ < option
244
+ value = { option . value }
245
+ disabled = { option . disabled }
246
+ selected = { option . selected } >
247
+ { state . getOptionLabel ( option ) }
248
+ </ option >
249
+ } >
241
250
< optgroup
242
251
label = { state . getOptionLabel ( option ) } >
243
252
< For each = { option . options } >
@@ -261,14 +270,6 @@ export default function DBSelect(props: DBSelectProps) {
261
270
</ For >
262
271
</ optgroup >
263
272
</ Show >
264
- < Show when = { ! option . options } >
265
- < option
266
- value = { option . value }
267
- disabled = { option . disabled }
268
- selected = { option . selected } >
269
- { state . getOptionLabel ( option ) }
270
- </ option >
271
- </ Show >
272
273
</ >
273
274
) }
274
275
</ For >
You can’t perform that action at this time.
0 commit comments