diff --git a/index.html b/index.html
index de3b983..870129f 100644
--- a/index.html
+++ b/index.html
@@ -76,6 +76,12 @@
]
data = [
+ {
+ 'Files': 'All Folders',
+ 'Size': '2M',
+ 'Last Updated': '',
+ 'indent': -1
+ },
{
'Files': 'Documents',
'Size': '2M',
@@ -130,7 +136,15 @@
'Last Updated': 'A few seconds ago',
'indent': 2
},
+ {
+ 'Files': 'dist',
+ 'Size': '21k',
+ 'Last Updated': 'A few seconds ago',
+ 'indent': 2
+ },
]
+
+ data.map(d => d.indent++)
}
function buildData() {
diff --git a/src/rowmanager.js b/src/rowmanager.js
index fe1178c..d912b9b 100644
--- a/src/rowmanager.js
+++ b/src/rowmanager.js
@@ -4,7 +4,8 @@ import {
nextTick,
ensureArray,
linkProperties,
- uniq
+ uniq,
+ numberSortAsc
} from './utils';
export default class RowManager {
@@ -192,7 +193,7 @@ export default class RowManager {
const childrenToShow = this.datamanager.getImmediateChildren(rowIndex);
const visibleRows = this.bodyRenderer.visibleRows;
- const rowsToShow = uniq([...childrenToShow, ...visibleRows]).sort();
+ const rowsToShow = uniq([...childrenToShow, ...visibleRows]).sort(numberSortAsc);
this.showRows(rowsToShow);
}
@@ -203,7 +204,9 @@ export default class RowManager {
const rowsToHide = this.datamanager.getChildren(rowIndex);
const visibleRows = this.bodyRenderer.visibleRows;
- const rowsToShow = visibleRows.filter(rowIndex => !rowsToHide.includes(rowIndex));
+ const rowsToShow = visibleRows
+ .filter(rowIndex => !rowsToHide.includes(rowIndex))
+ .sort(numberSortAsc);
rowsToHide.forEach(rowIndex => {
const row = this.datamanager.getRow(rowIndex);
diff --git a/src/style.css b/src/style.css
index 14adb08..49cd546 100644
--- a/src/style.css
+++ b/src/style.css
@@ -45,7 +45,6 @@
.dt-scrollable {
height: 40vw;
overflow: auto;
- border-bottom: 1px solid var(--dt-border-color);
&--highlight-all {
background-color: var(--dt-selection-highlight-color);
diff --git a/src/utils.js b/src/utils.js
index 3888b2a..4f49af7 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -130,3 +130,7 @@ export function ensureArray(val) {
export function uniq(arr) {
return _uniq(arr);
}
+
+export function numberSortAsc(a, b) {
+ return a - b;
+};