MCPcopy Create free account
hub / github.com/AllenFang/react-bootstrap-table / search

Method search

src/store/TableDataStore.js:450–465  ·  view source on GitHub ↗
(searchText)

Source from the content-addressed store, hash-verified

448 * It will search for the text if the input includes that text;
449 */
450 search(searchText) {
451 if (searchText.trim() === '') {
452 this.filteredData = null;
453 this.isOnFilter = false;
454 this.searchText = null;
455 if (this.filterObj) this._filter(this.data);
456 } else {
457 let source = this.data;
458 this.searchText = searchText;
459 if (this.filterObj) {
460 this._filter(source);
461 source = this.filteredData;
462 }
463 this._search(source);
464 }
465 }
466
467 _filter(source) {
468 const filterObj = this.filterObj;

Callers 5

_refreshMethod · 0.95
editMethod · 0.95
getTableDataFunction · 0.45
BootstrapTable.jsFile · 0.45

Calls 2

_filterMethod · 0.95
_searchMethod · 0.95

Tested by

no test coverage detected