(searchText)
| 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; |
no test coverage detected