FilterBar
AppSelect, multiselect, daterange ve text tabanlı filtre paneli. GET form submit ile URL tabanlı filtre desteği.
–
<%- include('modules/app/FilterBar', {
action: req.path,
method: 'get',
fields: [
{ type: 'select', id: 'status', label: 'Status', options: [{value:'active',label:'Active'},{value:'inactive',label:'Inactive'}] },
{ type: 'select', id: 'category', label: 'Category', options: categories.map(c => ({value: c.id, label: c.name})) },
{ type: 'daterange', id: 'date', label: 'Date range' },
],
values: req.query
}) %>
<%- include('modules/app/FilterBar', {
action: req.path,
fields: [
{ type: 'select', id: 'status', label: 'Status', options: statusOptions },
{ type: 'select', id: 'role', label: 'Role', options: roleOptions },
],
values: req.query
}) %>
<%
var _fields = locals.fields || [];
var _values = locals.values || {};
var _action = locals.action || '#';
var _method = locals.method || 'get';
var _applyLabel = locals.applyLabel || 'Apply';
var _resetLabel = locals.resetLabel || 'Reset';
%>