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
|
// Apply filters whenever templates, search query or selected tags change
|
||||||
if (templates) {
|
if (templates) {
|
||||||
const filtered = templates.filter((template) => {
|
const filtered = templates.filter((template) => {
|
||||||
// Filter by search query
|
// Filter by search query - search across name and description
|
||||||
const matchesSearch = template.name
|
const searchTerm = queryFromUrl.toLowerCase();
|
||||||
.toLowerCase()
|
const matchesSearch =
|
||||||
.includes(queryFromUrl.toLowerCase());
|
template.name.toLowerCase().includes(searchTerm) ||
|
||||||
|
template.description.toLowerCase().includes(searchTerm);
|
||||||
|
|
||||||
// Filter by selected tags
|
// Filter by selected tags
|
||||||
const matchesTags =
|
const matchesTags =
|
||||||
|
|||||||
Reference in New Issue
Block a user