diff options
author | bobzel <zzzman@gmail.com> | 2020-12-03 12:33:18 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-12-03 12:33:18 -0500 |
commit | c990b97e767a9eeffb9c218393486df48bc88aca (patch) | |
tree | 09f3c4b1885acafcf30b09c164ec7bd8b7ab5d19 | |
parent | 8557a0fd40076078bb4b5f0d88f6ed27f3f30284 (diff) |
from last
-rw-r--r-- | src/client/views/collections/TreeView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx index 53bc322bb..7b8dcc9f3 100644 --- a/src/client/views/collections/TreeView.tsx +++ b/src/client/views/collections/TreeView.tsx @@ -379,8 +379,8 @@ export class TreeView extends React.Component<TreeViewProps> { // if there's a sort ordering specified that can be modified on drop (eg, zorder can be modified, alphabetical can't), // then the modification would be done here const ordering = StrCast(this.doc[this.fieldKey + "-sortCriteria"]); - const docs = TreeView.sortDocs(this.childDocs || ([] as Doc[]), ordering); if (ordering === "zorder") { + const docs = TreeView.sortDocs(this.childDocs || ([] as Doc[]), ordering); doc.zIndex = addBefore ? (before ? NumCast(addBefore.zIndex) - 0.5 : NumCast(addBefore.zIndex) + 0.5) : 1000; docs.push(doc); docs.sort((a, b) => NumCast(a.zIndex) > NumCast(b.zIndex) ? 1 : -1); |