MCPcopy Index your code
hub / github.com/microsoft/SandDance / createUserSelection

Method createUserSelection

docs/app/js/sanddance-app.js:10510–10525  ·  view source on GitHub ↗
(search, assign, rebase)

Source from the content-addressed store, hash-verified

10508 }
10509 }
10510 createUserSelection(search, assign, rebase) {
10511 const exec = new (0, _searchExpression.Exec)(search, this.getColumns());
10512 const s = {
10513 search,
10514 included: [],
10515 excluded: []
10516 };
10517 const data = rebase ? this.data : this.currentData();
10518 data.forEach((datum)=>{
10519 if (exec.run(datum)) {
10520 if (assign) datum[(0, _sanddanceSpecs.FieldNames).Selected] = true;
10521 s.included.push(datum);
10522 } else s.excluded.push(datum);
10523 });
10524 return s;
10525 }
10526 deselect() {
10527 this.deactivate();
10528 this.data.forEach((datum)=>{

Callers 2

selectMethod · 0.95
filterMethod · 0.45

Calls 4

getColumnsMethod · 0.95
currentDataMethod · 0.95
forEachMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected