Skip to content
Snippets Groups Projects
Commit 489781b2 authored by legac's avatar legac
Browse files

Polish GridFilter by removing field default values for all fields.

parent 6609e556
No related branches found
No related tags found
No related merge requests found
......@@ -417,14 +417,18 @@ def to_gridFilter(table, **kwargs):
# get the standard configuration for the field
cfg = to_field(field)
# remove default value for fields which are not comboBox
if cfg['xtype'] != 'xcombobox':
cfg['value'] = ''
cfg['allowBlank'] = True
# remove default value
# make no sense in this context
if 'value' in cfg:
del cfg['value']
# replace all textarea by textfield
if cfg['xtype'] == 'textarea':
cfg['xtype'] = 'textfield'
# empty text for combobox
if cfg['xtype'] == 'xcombobox':
cfg['emptyText']= 'select...'
# prepare the name for the where close [table.field]
cfg['name'] = name
......@@ -433,7 +437,7 @@ def to_gridFilter(table, **kwargs):
cfg['filterComment'] = comment
cfg['filterOperator'] = operator
cfg['filterType'] = field.type
# copy the comment to be used as a tool tip
# when the plugin pFormToolTip is used
cfg['tipText'] = comment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment