Skip to content

Commit 1c892a7

Browse files
committed
Remove debug code
1 parent ac1337f commit 1c892a7

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

modules/backend/widgets/table/assets/js/build-min.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ Client.prototype.getRecords=function(offset,count,onSuccess){if(!count){onSucces
440440
Client.prototype.createRecord=function(recordData,placement,relativeToKey,offset,count,onSuccess){if(placement==='bottom'){this.data.push(recordData)}else if(placement=='above'||placement=='below'){var recordIndex=this.getIndexOfKey(relativeToKey)
441441
if(placement=='below')recordIndex++
442442
this.data.splice(recordIndex,0,recordData)}this.getRecords(offset,count,onSuccess)}
443-
Client.prototype.searchRecords=function(query,offset,count,onSuccess){const searchFields=this.tableObj.search.getSearchableColumns();console.log(this.data);console.log(query);console.log(searchFields);const matched=this.data.filter(function(record){for(let i=0;i<searchFields.length;i++){const value=record[searchFields[i]];if(value===undefined){continue;}if(value.toString().toLowerCase().includes(query.toLowerCase())){return true;}}return false;});if(matched.length===0){onSuccess([]);return;}if(!count){onSuccess(matched,matched.length);}else{onSuccess(matched.slice(offset,offset+count),matched.length);}}
443+
Client.prototype.searchRecords=function(query,offset,count,onSuccess){const searchFields=this.tableObj.search.getSearchableColumns();const matched=this.data.filter(function(record){for(let i=0;i<searchFields.length;i++){const value=record[searchFields[i]];if(value===undefined){continue;}if(value.toString().toLowerCase().includes(query.toLowerCase())){return true;}}return false;});if(matched.length===0){onSuccess([]);return;}if(!count){onSuccess(matched,matched.length);}else{onSuccess(matched.slice(offset,offset+count),matched.length);}}
444444
Client.prototype.updateRecord=function(key,recordData){var recordIndex=this.getIndexOfKey(key)
445445
if(recordIndex!==-1){recordData[this.tableObj.options.keyColumn]=key
446446
this.data[recordIndex]=recordData}else{throw new Error('Record with they key '+key+' is not found in the data set')}}

modules/backend/widgets/table/assets/js/table.datasource.client.js

-4
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@
9292
Client.prototype.searchRecords = function(query, offset, count, onSuccess) {
9393
const searchFields = this.tableObj.search.getSearchableColumns();
9494

95-
console.log(this.data);
96-
console.log(query);
97-
console.log(searchFields);
98-
9995
const matched = this.data.filter(function(record) {
10096
for (let i = 0; i < searchFields.length; i++) {
10197
const value = record[searchFields[i]];

0 commit comments

Comments
 (0)