Fix data widget not refreshing

This commit is contained in:
Jeremy Ruston
2024-05-07 18:33:53 +01:00
parent d5b7bc7d41
commit 83ebfc67fb
2 changed files with 30 additions and 4 deletions
+4 -4
View File
@@ -134,10 +134,10 @@ DataWidget.prototype.extractCompoundTiddler = function(title) {
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
DataWidget.prototype.refresh = function(changedTiddlers) {
// Refresh our attributes
var changedAttributes = this.computeAttributes();
// Refresh our children, and indicate that we refreshed if any of our attribute values have changed
return this.refreshChildren(changedTiddlers) || $tw.utils.count(changedAttributes) > 0;
// It would be expensive to calculate whether the changedTiddlers impact the filter
// identified by the $filter attribute so we just refresh ourselves unconditionally
this.refreshSelf();
return true;
};
exports.data = DataWidget;