mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
⚙️ Add option to clear the search.
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
return svgTitle.includes(searchTerm.toLowerCase());
|
||||
}));
|
||||
};
|
||||
|
||||
const clearSearch = () => {
|
||||
searchTerm = '';
|
||||
searchSvgs();
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -38,6 +43,7 @@
|
||||
<Search
|
||||
bind:searchTerm
|
||||
on:input={searchSvgs}
|
||||
clearSearch={() => clearSearch()}
|
||||
placeholder={`Search ${filteredSvgs.length} logos...`}
|
||||
/>
|
||||
<Grid>
|
||||
|
||||
Reference in New Issue
Block a user