Skip to content

Commit e3aa8d9

Browse files
committed
Add support for boolean in enum to schema generation.
1 parent 8202256 commit e3aa8d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dash/development/base_component.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ def _enum(x):
353353
if value == 'null':
354354
schema.update({'nullable': True})
355355
schema['allowed'].append(None)
356+
elif value == 'true':
357+
schema['allowed'].append(True)
358+
elif value == 'false':
359+
schema['allowed'].append(False)
356360
else:
357361
string_value = v['value'].strip("'\"'")
358362
schema['allowed'].append(string_value)

0 commit comments

Comments
 (0)