on 09-04-2020 11:34 AM
Hi,
How can I set a default value in the filter of a SmartTable?
<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration width="300px" key="credat" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false" mandatory="mandatory" index= '10' > <smartFilterBar:defaultFilterValues> <smartFilterBar:SelectOption operator="EQ" low="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" high="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" id="idDateLow"/> </smartFilterBar:defaultFilterValues> </smartFilterBar:ControlConfiguration> </smartFilterBar:controlConfiguration>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi dhiraj.more ,
Maybe it makes a difference if I use a ResponsiveTable but it does not work for me. I have added it to the view. I can't debug it very well because I don't know how to debug a view.
The path (Date) is the column-name?
For what is the credat and formatter.creationDate
?
And should I put something in the controller?
Hi Rick,
You can use something like this in smart filter bar Control Configuration in your view. I used it for date filter.
<smartFilterBar:defaultFilterValues>
<smartFilterBar:SelectOption operator="EQ" low="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" high="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" id="idMLReportDateLow"/> </smartFilterBar:defaultFilterValues>
Please let me know if it resolves your issue.
Thanks,
Dhiraj M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.