mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
chore: remove url param if the input was cleared
This commit is contained in:
parent
5053dc18b3
commit
cd748a8657
@ -47,7 +47,7 @@
|
||||
|
||||
// Search svgs:
|
||||
const searchSvgs = () => {
|
||||
$searchParam = searchTerm;
|
||||
$searchParam = searchTerm || null;
|
||||
loadSvgs();
|
||||
filteredSvgs = allSvgs.filter((svg: iSVG) => {
|
||||
let svgTitle = svg.title.toLowerCase();
|
||||
|
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
const searchSvgs = () => {
|
||||
$searchParam = searchTerm;
|
||||
$searchParam = searchTerm || null;
|
||||
return (filteredSvgs = svgsByCategory.filter((svg: iSVG) => {
|
||||
let svgTitle = svg.title.toLowerCase();
|
||||
return svgTitle.includes(searchTerm.toLowerCase());
|
||||
|
Loading…
Reference in New Issue
Block a user