Where to find the standard filter code

Hello All,
May anybody let me know, where to find the code in frappe for standard filter show below:

Regards
Ruchin Sharma

Anyone, any idea about this?

@ruchin78,

You can find the code for standard filters in make_standard_filter function in base_list.js

https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/list/base_list.js#L539.

Thanks,
Makarand

Hi ruchin78

One way to uncover that is, on a page with a list that contains a filter, view the page source.

Then use the browser search to find instances of ‘filter’ to discover ‘in_standard_filter’ in the code.

Then grep the js code for that

frappe@erpnext:~/frappe-bench$ find . -name ‘*.js’ | xargs grep ‘in_standard_filter’
./apps/frappe/frappe/public/js/frappe/ui/base_list.js: if(df.in_standard_filter && !frappe.model.no_value_type.includes(df.fieldtype)) {
./apps/frappe/frappe/public/js/frappe/views/reports/reportview.js: if((df.in_standard_filter || df.in_list_view) && df.fieldname!=‘naming_series’
grep: ./node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js: Is a directory
./sites/assets/js/list.min.js: if (df.in_standard_filter && !frappe.model.no_value_type.includes(df.fieldtype)) {
./sites/assets/js/report.min.js: if ((df.in_standard_filter || df.in_list_view) && df.fieldname != ‘naming_series’ && !in_list(frappe.model.no_value_type, df.fieldtype) && !df.report_hide) {

edit: refer to her Where to find the standard filter code