admin-on-rest-fr05t1k
Version:
A frontend Framework for building admin applications on top of REST services, using ES6, React and Material UI
22 lines (18 loc) • 559 B
JavaScript
export const CRUD_SHOW_FILTER = 'CRUD_SHOW_FILTER';
export const CRUD_HIDE_FILTER = 'CRUD_HIDE_FILTER';
export const CRUD_SET_FILTER = 'CRUD_SET_FILTER';
export const showFilter = (resource, field) => ({
type: CRUD_SHOW_FILTER,
payload: { field },
meta: { resource },
});
export const hideFilter = (resource, field) => ({
type: CRUD_HIDE_FILTER,
payload: { field },
meta: { resource },
});
export const setFilter = (resource, field, value) => ({
type: CRUD_SET_FILTER,
payload: { field, value },
meta: { resource },
});