I have a FilterBuilder requirement to set the default field operator to "contains". After reviewing the documentation I set the "validOperators" in the data source to "contains" and "iContains" (see source code) but when the FilterBuilder form is rendered the default is set to "equals" which is not even in the list of valid operators (see screen shots). Using the example code below, I expected to have two operators and the default operator to be "contains". I have tried other approaches without success including overriding the "getFieldOperators" in the data source, setting "fieldPickerProperties" and "fieldPickerDefaults" in the FilterBuilder instance, and reviewing the SmartClient documentation looking for a way to specify the default operator. Any help or guidance is greatly appreciated.
I tested on Linux using the following SmartClient and browser versions:
SmartClient_v111p_2017-07-28_LGPL
SmartClient_v111p_2017-08-07_LGPL
Chromium 53.0.2785.143 (64-bit)
FireFox 51.0.1 (64-bit)
Below are my test code and screen shots.
Thanks,
Andy
I tested on Linux using the following SmartClient and browser versions:
SmartClient_v111p_2017-07-28_LGPL
SmartClient_v111p_2017-08-07_LGPL
Chromium 53.0.2785.143 (64-bit)
FireFox 51.0.1 (64-bit)
Below are my test code and screen shots.
Thanks,
Andy
Code:
var dsFilterBuilder = isc.RestDataSource.create({ 'ID': 'dsFilterBuilder' ,'dataFormat' : 'json' ,'fields': [ { 'name': 'name1' ,'title': 'Name 1' ,'type': 'text' ,'validOperators': ['contains', 'iContains'] } ] }); isc.FilterBuilder.create({ 'ID': 'fb' ,'dataSource': dsFilterBuilder });
Comment