close search button

This commit is contained in:
Jan Prochazka
2021-12-09 12:37:14 +01:00
parent 7d5f7791db
commit 1cf4dc0013
4 changed files with 18 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
import socket from '../utility/socket';
import axiosInstance from '../utility/axiosInstance';
import openNewTab from '../utility/openNewTab';
import CloseSearchButton from '../elements/CloseSearchButton.svelte';
let filter = '';
let search = '';
@@ -43,11 +44,16 @@
socket.off('query-history-changed', reloadItems);
};
});
</script>
<SearchBoxWrapper>
<SearchInput placeholder="Search query history" {filter} bind:value={filter} />
<CloseSearchButton
bind:filter
on:click={() => {
search = '';
}}
/>
</SearchBoxWrapper>
<WidgetsInnerContainer>
{#each historyItems as item}
@@ -98,5 +104,4 @@
overflow: hidden;
text-overflow: ellipsis;
}
</style>