Comments (2)
Hola, en Admin on rest tu puedes decorar tu restClient con un filtro
const addFiltersCapabilities = requestHandler => (type, resource, params) => {
switch (type) {
case GET_LIST:
if (
resource === 'Notices' &&
params.filter.name !== undefined &&
type === 'GET_LIST'
) {
return requestHandler('GET_LIST', 'Notices', {
pagination: {},
sort: {},
filter: { name: { regexp: `.*${params.filter.name}.*` } }
});
}
return requestHandler(type, resource, params);
default:
return requestHandler(type, resource, params);
}
};
export default addFiltersCapabilities;
so
<Admin
restClient={addFiltersCapabilities(loopbackRestClient(API_URL))}
>
espero sirva de ayuda
from aor-loopback.
In MySql i have to use
if (query['where']) { var json = query['where']; query['where'] = {}; Object.keys(json).forEach(function (key) { query['where'][key] = { "regexp": '/^'+json[key]+'/i' }; }); }
from aor-loopback.
Related Issues (18)
- GET_LIST response is not being handled in index.js HOT 3
- AOR 2.0.0-beta1 HOT 1
- Support for "ra" ("react-admin" version 2, aka "admin-on-rest version 2) HOT 1
- create user form not working
- How to use authorization? HOT 4
- Support for DELETE_MANY and UPDATE_MANY, for 'next' branch HOT 5
- the objective of this line HOT 1
- The X-Total-Count header is missing in the HTTP Response. HOT 23
- So this doesn't work with react-admin? HOT 5
- The problem with deleting the record in the fresh versions of react-admin HOT 2
- Auth_get_permissions with React-admin
- [Suggestion] Please provide a simple example HOT 2
- Uploading Images With aor-loopback HOT 3
- How to create a page for create new user HOT 1
- Use PATCH instead of PUT for update HOT 5
- ReferenceArrayInput doesn't seem to work HOT 2
- ReferenceField not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aor-loopback.