SearchInput+IconGrid: scroll to top of grid on search change

When the debounced search query changes, scroll to the top of the grid
if the query is not the empty string. This has the same smooth behavior
as the scroll buttons, which is not currently available on WebKit.
This commit is contained in:
rektdeckard
2020-09-26 00:41:48 -04:00
parent 55ddcfc9a7
commit 55bab04497
3 changed files with 17 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ const IconGrid: React.FC<IconGridProps> = () => {
className="grid-container"
style={{ backgroundColor: isDark ? "#35313D" : "" }}
>
<i id="beacon" className="beacon" />
<motion.div
className="grid"
initial="hidden"