mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-13 08:46:56 +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:
|
// Search svgs:
|
||||||
const searchSvgs = () => {
|
const searchSvgs = () => {
|
||||||
$searchParam = searchTerm;
|
$searchParam = searchTerm || null;
|
||||||
loadSvgs();
|
loadSvgs();
|
||||||
filteredSvgs = allSvgs.filter((svg: iSVG) => {
|
filteredSvgs = allSvgs.filter((svg: iSVG) => {
|
||||||
let svgTitle = svg.title.toLowerCase();
|
let svgTitle = svg.title.toLowerCase();
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const searchSvgs = () => {
|
const searchSvgs = () => {
|
||||||
$searchParam = searchTerm;
|
$searchParam = searchTerm || null;
|
||||||
return (filteredSvgs = svgsByCategory.filter((svg: iSVG) => {
|
return (filteredSvgs = svgsByCategory.filter((svg: iSVG) => {
|
||||||
let svgTitle = svg.title.toLowerCase();
|
let svgTitle = svg.title.toLowerCase();
|
||||||
return svgTitle.includes(searchTerm.toLowerCase());
|
return svgTitle.includes(searchTerm.toLowerCase());
|
||||||
|
Loading…
Reference in New Issue
Block a user