dazscript-framework 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dazscript-framework",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "author": "Freddy Diaz",
5
5
  "license": "MPL-2.0",
6
6
  "description": "",
@@ -81,7 +81,6 @@ export class ListViewBuilder<TItem, TData> implements IWidgetBuilder<DzListView>
81
81
  }
82
82
 
83
83
  sortOnBuild(onOff: boolean = true): this {
84
- this.context.sortOnBuild = onOff
85
84
  return this
86
85
  }
87
86
 
@@ -141,7 +140,6 @@ class ListViewBuilderContext<TItem, TData> {
141
140
  data: (item: TreeNode<TItem>) => TData
142
141
  sorting: number = 0
143
142
  sortAscending: boolean = true
144
- sortOnBuild: boolean = true
145
143
  selectionMode: number | null = null
146
144
  selected: Observable<TData>
147
145
  filter: ListViewFilterOptions
@@ -333,7 +331,6 @@ const build = <TItem, TData>(context: ListViewBuilderContext<TItem, TData>): DzL
333
331
  }
334
332
 
335
333
  listView.rootIsDecorated = context.decorated
336
- if (context.sorting >= 0 && context.sortOnBuild) listView.sort()
337
334
 
338
335
  if (context.filter?.keywords.value || context.filter?.filters)
339
336
  filterList()
@@ -403,7 +400,6 @@ const build = <TItem, TData>(context: ListViewBuilderContext<TItem, TData>): DzL
403
400
  if (!incomingPaths[path]) listView.deleteItem(li)
404
401
  })
405
402
 
406
- listView.sort()
407
403
  }
408
404
 
409
405
  const onSelectionChanged = (callback: (item: DzListViewItem, data: TData) => void) => {
@@ -417,6 +413,7 @@ const build = <TItem, TData>(context: ListViewBuilderContext<TItem, TData>): DzL
417
413
  buildColumns(columns)
418
414
  })
419
415
 
416
+ listView.showSortIndicator = context.sorting >= 0
420
417
  listView.setSorting(context.sorting, context.sortAscending)
421
418
  if (context.selectionMode !== null) {
422
419
  listView.selectionMode = context.selectionMode