Performing a setFilterEditorCriteria(null) or setFilterEditorCriteria({}) does not re-enable any disabled filter editor fields when alwaysShowOperatorIcon is set to true on a list grid.
VERSION: v12.0p_2019-07-10/Pro.
BROWSER: This behavior has been observed on all browsers/platforms i.e. Chrome,Firefox,IE11,Safari/Linux,Windows 7 Enterprise,Mac Mojave
SCENARIO:
In a ListGrid with showFilterEditor, allowFilterOperators and set to true and alwaysShowOperatorIcon set to false, the user can click an operator icon and select “is blank”. This action correctly disabled the filter’s text field. When the user performs a clear operation (setFilterEditorCriteria(null) or setFilterEditorCriteria({})), the operator icon disappears and the filter text field re-enables. This is correct behaviour.
Now, if you set alwaysShowOperatorIcon to true and perform the same actions, the operator icon reverts back to default (contains), but the filter text field stays disabled. The user is then unable to type anything in the filter editor. Manually toggling the filter operator seems to re-enable the field.
STEPS TO REPRODUCE:
Navigate to the following Showcase example: https://www.smartclient.com/smartcli...OperatorFilter
Replace the entire contents of inlineOperatorFilter.js with the following (only adding the alwaysShowOperatorIcon property):
Click on the "Try it" button to run the code
All operators will be displayed:
Using the header context menu (right click) on the Capital filter editor, select the “is Blank” filter. The “is blank” filter icon is applied and the filter editor text field is disabled as expected:
Now, open your browser’s developer console. And type “countryList.setFilterEditorCriteria(null);” or countryList.setFilterEditorCriteria({});”. Notice that the filter editor operator icons properly revert back to the default icons, but the Capital filter editor text field stays disabled as if the operator was still “is blank”:
The user is now unable to filter on the Capital column as the text box is disabled. Manually toggling the filter by right clicking and changing the filter operator on the column is the only way for the user to re-enable the text box.
VERSION: v12.0p_2019-07-10/Pro.
BROWSER: This behavior has been observed on all browsers/platforms i.e. Chrome,Firefox,IE11,Safari/Linux,Windows 7 Enterprise,Mac Mojave
SCENARIO:
In a ListGrid with showFilterEditor, allowFilterOperators and set to true and alwaysShowOperatorIcon set to false, the user can click an operator icon and select “is blank”. This action correctly disabled the filter’s text field. When the user performs a clear operation (setFilterEditorCriteria(null) or setFilterEditorCriteria({})), the operator icon disappears and the filter text field re-enables. This is correct behaviour.
Now, if you set alwaysShowOperatorIcon to true and perform the same actions, the operator icon reverts back to default (contains), but the filter text field stays disabled. The user is then unable to type anything in the filter editor. Manually toggling the filter operator seems to re-enable the field.
STEPS TO REPRODUCE:
Navigate to the following Showcase example: https://www.smartclient.com/smartcli...OperatorFilter
Replace the entire contents of inlineOperatorFilter.js with the following (only adding the alwaysShowOperatorIcon property):
Code:
isc.ListGrid.create({ ID: "countryList", width:550, height:300, alternateRecordStyles:true, dataSource: worldDS, fields:[ {name:"countryCode", width:60}, {name:"countryName"}, {name:"capital"}, {name:"continent"}, {name:"area"}, {name:"population"} ], autoFetchData: true, showFilterEditor: true, allowFilterOperators: true, alwaysShowOperatorIcon: true, initialCriteria: { _constructor: "AdvancedCriteria", operator: "and", criteria: [ { fieldName: "countryName", operator: "iNotContains", value: "i" }, { fieldName: "capital", operator: "iNotStartsWith", value: "p" } ] } });
All operators will be displayed:
Using the header context menu (right click) on the Capital filter editor, select the “is Blank” filter. The “is blank” filter icon is applied and the filter editor text field is disabled as expected:
Now, open your browser’s developer console. And type “countryList.setFilterEditorCriteria(null);” or countryList.setFilterEditorCriteria({});”. Notice that the filter editor operator icons properly revert back to the default icons, but the Capital filter editor text field stays disabled as if the operator was still “is blank”:
The user is now unable to filter on the Capital column as the text box is disabled. Manually toggling the filter by right clicking and changing the filter operator on the column is the only way for the user to re-enable the text box.
Comment