mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 11:03:57 +00:00
close search button
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { GridDisplay } from 'dbgate-datalib';
|
import { GridDisplay } from 'dbgate-datalib';
|
||||||
import { filterName } from 'dbgate-tools';
|
import { filterName } from 'dbgate-tools';
|
||||||
|
import CloseSearchButton from '../elements/CloseSearchButton.svelte';
|
||||||
|
|
||||||
import InlineButton from '../elements/InlineButton.svelte';
|
import InlineButton from '../elements/InlineButton.svelte';
|
||||||
import ManagerInnerContainer from '../elements/ManagerInnerContainer.svelte';
|
import ManagerInnerContainer from '../elements/ManagerInnerContainer.svelte';
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
|
|
||||||
<SearchBoxWrapper>
|
<SearchBoxWrapper>
|
||||||
<SearchInput placeholder="Search columns" bind:value={filter} />
|
<SearchInput placeholder="Search columns" bind:value={filter} />
|
||||||
|
<CloseSearchButton bind:filter />
|
||||||
{#if isDynamicStructure && !isJsonView}
|
{#if isDynamicStructure && !isJsonView}
|
||||||
<InlineButton
|
<InlineButton
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { GridDisplay } from 'dbgate-datalib';
|
import { GridDisplay } from 'dbgate-datalib';
|
||||||
import { filterName } from 'dbgate-tools';
|
import { filterName } from 'dbgate-tools';
|
||||||
import { createEventDispatcher } from 'svelte';
|
import { createEventDispatcher } from 'svelte';
|
||||||
|
import CloseSearchButton from '../elements/CloseSearchButton.svelte';
|
||||||
|
|
||||||
import InlineButton from '../elements/InlineButton.svelte';
|
import InlineButton from '../elements/InlineButton.svelte';
|
||||||
import ManagerInnerContainer from '../elements/ManagerInnerContainer.svelte';
|
import ManagerInnerContainer from '../elements/ManagerInnerContainer.svelte';
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
|
|
||||||
<SearchBoxWrapper>
|
<SearchBoxWrapper>
|
||||||
<SearchInput placeholder="Search references" bind:value={filter} />
|
<SearchInput placeholder="Search references" bind:value={filter} />
|
||||||
|
<CloseSearchButton bind:filter />
|
||||||
</SearchBoxWrapper>
|
</SearchBoxWrapper>
|
||||||
<ManagerInnerContainer width={managerSize}>
|
<ManagerInnerContainer width={managerSize}>
|
||||||
{#if foreignKeys.length > 0}
|
{#if foreignKeys.length > 0}
|
||||||
|
|||||||
@@ -7,7 +7,13 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if filter}
|
{#if filter}
|
||||||
<InlineButton on:click={() => (filter = '')} title="Clear filter">
|
<InlineButton
|
||||||
|
on:click
|
||||||
|
on:click={() => {
|
||||||
|
filter = '';
|
||||||
|
}}
|
||||||
|
title="Clear filter"
|
||||||
|
>
|
||||||
<FontIcon icon="icon close" />
|
<FontIcon icon="icon close" />
|
||||||
</InlineButton>
|
</InlineButton>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
import socket from '../utility/socket';
|
import socket from '../utility/socket';
|
||||||
import axiosInstance from '../utility/axiosInstance';
|
import axiosInstance from '../utility/axiosInstance';
|
||||||
import openNewTab from '../utility/openNewTab';
|
import openNewTab from '../utility/openNewTab';
|
||||||
|
import CloseSearchButton from '../elements/CloseSearchButton.svelte';
|
||||||
|
|
||||||
let filter = '';
|
let filter = '';
|
||||||
let search = '';
|
let search = '';
|
||||||
@@ -43,11 +44,16 @@
|
|||||||
socket.off('query-history-changed', reloadItems);
|
socket.off('query-history-changed', reloadItems);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SearchBoxWrapper>
|
<SearchBoxWrapper>
|
||||||
<SearchInput placeholder="Search query history" {filter} bind:value={filter} />
|
<SearchInput placeholder="Search query history" {filter} bind:value={filter} />
|
||||||
|
<CloseSearchButton
|
||||||
|
bind:filter
|
||||||
|
on:click={() => {
|
||||||
|
search = '';
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</SearchBoxWrapper>
|
</SearchBoxWrapper>
|
||||||
<WidgetsInnerContainer>
|
<WidgetsInnerContainer>
|
||||||
{#each historyItems as item}
|
{#each historyItems as item}
|
||||||
@@ -98,5 +104,4 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user