Skip to content

Build your personal knowledge base with Trilium Notes

feat(views/table): force a refresh if #sorted is changed

Elian Doran504a842d3716
diff --git a/apps/client/src/widgets/view_widgets/table_view/index.ts b/apps/client/src/widgets/view_widgets/table_view/index.ts
index e03c7628be..031c7dcc58 100644
--- a/apps/client/src/widgets/view_widgets/table_view/index.ts
+++ b/apps/client/src/widgets/view_widgets/table_view/index.ts
@@ -248,6 +248,11 @@ export default class TableView extends ViewMode<StateInfo> {
return;
}
+ // Force a refresh if sorted is changed since we need to disable reordering.
+ if (loadResults.getAttributeRows().find(a => attributes.isAffecting(a, this.parentNote))) {
+ return true;
+ }
+
// Refresh if promoted attributes get changed.
if (loadResults.getAttributeRows().find(attr =>
attr.type === "label" &&