Allowing partial and case-insensitive results from entity and actor search.
This commit is contained in:
parent
099296280c
commit
91643ceac1
|
@ -439,7 +439,7 @@ async function createAlert() {
|
||||||
|
|
||||||
async function searchActors() {
|
async function searchActors() {
|
||||||
const res = await get('/actors', {
|
const res = await get('/actors', {
|
||||||
q: actorQuery.value,
|
q: `${actorQuery.value}*`, // return partial matches
|
||||||
limit: 10,
|
limit: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ export async function fetchEntities(options) {
|
||||||
if (options.query) {
|
if (options.query) {
|
||||||
builder.where((whereBuilder) => {
|
builder.where((whereBuilder) => {
|
||||||
whereBuilder
|
whereBuilder
|
||||||
.whereLike('name', options.query)
|
.whereILike('name', `%${options.query}%`)
|
||||||
.orWhereLike('slug', options.query);
|
.orWhereILike('slug', `%${options.query}%`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue