Ticket #1258 (assigned enhancement)

Opened 3 years ago

Last modified 2 years ago

filterTiddlers in a certain list

Reported by: jdlrobson Owned by: MartinBudden
Priority: undefined Milestone: 2.7.1
Component: core Version:
Severity: medium Keywords:
Cc:

Description

It would be highly useful if the TiddlyWiki.prototype.filterTiddlers took a second (optional) argument tiddlers which could be used by plugins to only filter a certain subset of tiddlers.

expected: TiddlyWiki.prototype.filterTiddlers = function(filter, tiddlers) if tiddlers not given uses store.getTiddlers().

Change History

Changed 3 years ago by FND

  • milestone set to 2.7

Changed 3 years ago by MartinBudden

  • owner changed from JeremyRuston to MartinBudden
  • priority changed from undefined to major
  • status changed from new to assigned
  • severity changed from undefined to medium
  • milestone changed from 2.7 to 2.7.1

Changed 2 years ago by jdlrobson

This would require post-processing of the results to compare them with the passed in list of tiddlers

TiddlyWiki.prototype.filterTiddlers = function(filter, tiddlers)

Changed 2 years ago by jdlrobson

  • priority changed from major to undefined

This can be achieved via:

var newStore = new TiddlyWiki();
for(Var i = 0; i < tiddlers.length; i++) {
newStore.addTiddler(tiddlers[i]);
}
newStore.filterTiddlers();

Hence it's actually just a nice to have. Adding a tiddlers option to filterTiddlers would at least be consistent with sortTiddlers but one can live without it.

Note: See TracTickets for help on using tickets.