MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / onFindEdited

Method onFindEdited

tools/xsbug/FilePane.js:386–410  ·  view source on GitHub ↗
(table)

Source from the content-addressed store, hash-verified

384 this.onFindEdited(table);
385 }
386 onFindEdited(table) {
387 table.stop();
388 let data = this.data;
389 if (data.findString) {
390 searchService.search(
391 findModeToPattern(data.findMode, data.findString),
392 findModeToCaseless(data.findMode),
393 model.homes.items.map(item => ({ name:item.name, path:item.path })))
394 .then(results => {
395 data.items = results;
396 application.distribute("onSearchComplete")
397 });
398 if (data.items && data.items.length) {
399 table.time = 0;
400 table.start();
401 }
402 else
403 data.items = null;
404 this.expand(table, true);
405 }
406 else {
407 data.items = null;
408 this.expand(table, false);
409 }
410 }
411 onFinished(table) {
412 let data = this.data;
413 data.items = null;

Callers 2

onCreateMethod · 0.95
onFindEditedMethod · 0.45

Calls 8

expandMethod · 0.95
findModeToPatternFunction · 0.90
findModeToCaselessFunction · 0.90
mapMethod · 0.80
distributeMethod · 0.80
stopMethod · 0.65
startMethod · 0.65
searchMethod · 0.45

Tested by

no test coverage detected