Add search event listeners on graphs

This commit is contained in:
Henrik Giesel 2021-01-05 22:28:51 +01:00
parent fdf4c6628f
commit c8f0ee8b3b

View File

@ -24,7 +24,9 @@
const preferencesPromise = getPreferences();
const refreshWith = async (search: string, days: number) => {
const refreshWith = async (searchNew: string, days: number) => {
search = searchNew
active = true;
try {
[sourceData, preferences] = await Promise.all([
@ -44,6 +46,11 @@
};
refreshWith(search, days);
const browserSearch = (event: CustomEvent) => {
const query = `${search} ${event.detail.query}`
bridgeCommand(`browserSearch:${query}`)
}
</script>
{#if controller}
@ -65,7 +72,8 @@
{preferences}
{revlogRange}
{i18n}
{nightMode} />
{nightMode}
on:search={browserSearch} />
{/each}
</div>
{/if}