mirror of
https://github.com/Dokploy/templates.git
synced 2026-06-15 20:25:24 +02:00
feat(Search): enhance search functionality to include template descriptions (#400)
This commit is contained in:
committed by
GitHub
parent
719ad62852
commit
87970b2d3b
@@ -55,10 +55,11 @@ const Search = () => {
|
||||
// Apply filters whenever templates, search query or selected tags change
|
||||
if (templates) {
|
||||
const filtered = templates.filter((template) => {
|
||||
// Filter by search query
|
||||
const matchesSearch = template.name
|
||||
.toLowerCase()
|
||||
.includes(queryFromUrl.toLowerCase());
|
||||
// Filter by search query - search across name and description
|
||||
const searchTerm = queryFromUrl.toLowerCase();
|
||||
const matchesSearch =
|
||||
template.name.toLowerCase().includes(searchTerm) ||
|
||||
template.description.toLowerCase().includes(searchTerm);
|
||||
|
||||
// Filter by selected tags
|
||||
const matchesTags =
|
||||
|
||||
Reference in New Issue
Block a user