diff --git a/components/alerts/create.vue b/components/alerts/create.vue index e4b6a46..4d875ac 100644 --- a/components/alerts/create.vue +++ b/components/alerts/create.vue @@ -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, }); diff --git a/src/entities.js b/src/entities.js index bd7039b..3a2b7fb 100644 --- a/src/entities.js +++ b/src/entities.js @@ -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}%`); }); }