mirror of
https://origin.cursor.com/mrdevmx/panels.git
synced 2026-10-09 17:13:18 +00:00
11 lines
294 B
TypeScript
11 lines
294 B
TypeScript
export function useTableSearch() {
|
|
const tableQ = ref("");
|
|
|
|
function matches(...parts: unknown[]) {
|
|
const q = tableQ.value.trim().toLowerCase();
|
|
if (!q) return true;
|
|
return parts.some((part) => String(part ?? "").toLowerCase().includes(q));
|
|
}
|
|
|
|
return { tableQ, matches };
|
|
}
|