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() {
|
||||
const res = await get('/actors', {
|
||||
q: actorQuery.value,
|
||||
q: `${actorQuery.value}*`, // return partial matches
|
||||
limit: 10,
|
||||
});
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ export async function fetchEntities(options) {
|
|||
if (options.query) {
|
||||
builder.where((whereBuilder) => {
|
||||
whereBuilder
|
||||
.whereLike('name', options.query)
|
||||
.orWhereLike('slug', options.query);
|
||||
.whereILike('name', `%${options.query}%`)
|
||||
.orWhereILike('slug', `%${options.query}%`);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue