From ad35e6fc16611407d1adbbbed3c239b15f8cf741 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Wed, 2 Sep 2020 09:28:41 +0200 Subject: [PATCH] Do not expand sorted array --- src/components/modals/SortModal.svelte | 24 +++++++++++------------- src/components/treemode/TreeMode.svelte | 5 ----- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/components/modals/SortModal.svelte b/src/components/modals/SortModal.svelte index 1c08fc9..b0bc955 100644 --- a/src/components/modals/SortModal.svelte +++ b/src/components/modals/SortModal.svelte @@ -92,19 +92,17 @@ import { compileJSONPointer } from '../../utils/jsonPointer'; - {#if rootPath.length > 0} - - Path - - - - - {/if} + + Path + + 0 ? stringifyPath(rootPath) : '(whole document)'} + /> + + {#if jsonIsArray && (properties.length > 1 || selectedProperty === undefined) } Property diff --git a/src/components/treemode/TreeMode.svelte b/src/components/treemode/TreeMode.svelte index 5397a6a..899dc7b 100644 --- a/src/components/treemode/TreeMode.svelte +++ b/src/components/treemode/TreeMode.svelte @@ -276,12 +276,7 @@ rootPath, onSort: async (operations) => { console.log('onSort', rootPath, operations) - patch(operations, selection) - - await tick() - - handleExpand(rootPath, true, false) } }, { ...SIMPLE_MODAL_OPTIONS,