-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
By default the dynamic filter uses the column names of the model as its options.
This can be overwritten by
filter(:condition, :dynamic,
header: _('Dynamic condition'),
operations: %w[= =~ >= <= !=],
select: [[_('Title'), :title],
[_('Text'), :text],
[_('Author'), 'users.screenname']])
# this fails when using associated models with the LIKE_OPERATION.
if column_type(field) == :string
driver.contains(scope, field, value)
else
value = Datagrid::Utils.format_date_as_timestamp(value) if date_conversion
driver.where(scope, field, value)
endin that case the column_type(field) returns nil and thus driver.where(scope, field, value) is called, which does not partial match.
Is it an option to also run the contain when the column_type(field) returns nil?
I tested this locally and it works
Metadata
Metadata
Assignees
Labels
No labels