mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 15:16:00 +00:00
handler UX scroll problem
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
export let onUnpin = null;
|
export let onUnpin = null;
|
||||||
export let showPinnedInsteadOfUnpin = false;
|
export let showPinnedInsteadOfUnpin = false;
|
||||||
export let indentLevel = 0;
|
export let indentLevel = 0;
|
||||||
|
export let disableBoldScroll = false;
|
||||||
|
|
||||||
$: isChecked =
|
$: isChecked =
|
||||||
checkedObjectsStore && $checkedObjectsStore.find(x => module?.extractKey(data) == module?.extractKey(x));
|
checkedObjectsStore && $checkedObjectsStore.find(x => module?.extractKey(data) == module?.extractKey(x));
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
// $: console.log(title, indentLevel);
|
// $: console.log(title, indentLevel);
|
||||||
let domDiv;
|
let domDiv;
|
||||||
|
|
||||||
$: if (isBold && domDiv) {
|
$: if (isBold && domDiv && !disableBoldScroll) {
|
||||||
domDiv.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
domDiv.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import _, { sortBy } from 'lodash';
|
import _ from 'lodash';
|
||||||
import { asyncFilter } from '../utility/common';
|
|
||||||
import AppObjectGroup from './AppObjectGroup.svelte';
|
import AppObjectGroup from './AppObjectGroup.svelte';
|
||||||
import { plusExpandIcon } from '../icons/expandIcons';
|
import { plusExpandIcon } from '../icons/expandIcons';
|
||||||
|
|
||||||
|
|||||||
@@ -394,4 +394,5 @@
|
|||||||
(data.singleDatabase
|
(data.singleDatabase
|
||||||
? $focusedConnectionOrDatabase?.database == data.defaultDatabase
|
? $focusedConnectionOrDatabase?.database == data.defaultDatabase
|
||||||
: !$focusedConnectionOrDatabase?.database)}
|
: !$focusedConnectionOrDatabase?.database)}
|
||||||
/>
|
disableBoldScroll={!!$focusedConnectionOrDatabase}
|
||||||
|
/>
|
||||||
|
|||||||
@@ -559,4 +559,5 @@ await dbgateApi.dropAllDbObjects(${JSON.stringify(
|
|||||||
: null}
|
: null}
|
||||||
isChoosed={data.connection?._id == $focusedConnectionOrDatabase?.conid &&
|
isChoosed={data.connection?._id == $focusedConnectionOrDatabase?.conid &&
|
||||||
data.name == $focusedConnectionOrDatabase?.database}
|
data.name == $focusedConnectionOrDatabase?.database}
|
||||||
|
disableBoldScroll={!!$focusedConnectionOrDatabase}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -285,7 +285,11 @@
|
|||||||
expandOnClick
|
expandOnClick
|
||||||
isExpandable={data => $openedConnections.includes(data._id) && !data.singleDatabase}
|
isExpandable={data => $openedConnections.includes(data._id) && !data.singleDatabase}
|
||||||
{filter}
|
{filter}
|
||||||
passProps={{ ...passProps, connectionColorFactory: $connectionColorFactory, showPinnedInsteadOfUnpin: true }}
|
passProps={{
|
||||||
|
...passProps,
|
||||||
|
connectionColorFactory: $connectionColorFactory,
|
||||||
|
showPinnedInsteadOfUnpin: true,
|
||||||
|
}}
|
||||||
getIsExpanded={data => $expandedConnections.includes(data._id) && !data.singleDatabase}
|
getIsExpanded={data => $expandedConnections.includes(data._id) && !data.singleDatabase}
|
||||||
setIsExpanded={(data, value) => {
|
setIsExpanded={(data, value) => {
|
||||||
expandedConnections.update(old => (value ? [...old, data._id] : old.filter(x => x != data._id)));
|
expandedConnections.update(old => (value ? [...old, data._id] : old.filter(x => x != data._id)));
|
||||||
@@ -309,7 +313,10 @@
|
|||||||
expandOnClick
|
expandOnClick
|
||||||
isExpandable={data => $openedConnections.includes(data._id) && !data.singleDatabase}
|
isExpandable={data => $openedConnections.includes(data._id) && !data.singleDatabase}
|
||||||
{filter}
|
{filter}
|
||||||
passProps={{ connectionColorFactory: $connectionColorFactory, showPinnedInsteadOfUnpin: true }}
|
passProps={{
|
||||||
|
connectionColorFactory: $connectionColorFactory,
|
||||||
|
showPinnedInsteadOfUnpin: true,
|
||||||
|
}}
|
||||||
getIsExpanded={data => $expandedConnections.includes(data._id) && !data.singleDatabase}
|
getIsExpanded={data => $expandedConnections.includes(data._id) && !data.singleDatabase}
|
||||||
setIsExpanded={(data, value) => {
|
setIsExpanded={(data, value) => {
|
||||||
expandedConnections.update(old => (value ? [...old, data._id] : old.filter(x => x != data._id)));
|
expandedConnections.update(old => (value ? [...old, data._id] : old.filter(x => x != data._id)));
|
||||||
|
|||||||
Reference in New Issue
Block a user