Commit 445d1c17 authored by Paul Brown's avatar Paul Brown

add allow_blank support to column_editable_list

parent 9bce6a5b
...@@ -147,4 +147,8 @@ class XEditableWidget(object): ...@@ -147,4 +147,8 @@ class XEditableWidget(object):
else: else:
raise Exception('Unsupported field type: %s' % (type(subfield),)) raise Exception('Unsupported field type: %s' % (type(subfield),))
# for Select2, QuerySelectField, and ModelSelectField
if getattr(subfield, 'allow_blank', False):
kwargs['data-source']['__None'] = ""
return kwargs return kwargs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment