Skip to content

Commit b5d1e35

Browse files
Safwan AlhajiYousef Sultan
Safwan Alhaji
authored and
Yousef Sultan
committed
Fixing nested path searching issue (#32)
1 parent d4cc43c commit b5d1e35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DataTable.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@
314314
315315
// Enable searching of numbers (non-string)
316316
// Temporary fix of https://github.com/krisk/Fuse/issues/144
317-
searchConfig.getFn = function (obj, path) {
318-
if(Number.isInteger(obj[path]))
319-
return JSON.stringify(obj[path]);
320-
return obj[path];
317+
searchConfig.getFn = (obj, path) => {
318+
if(Number.isInteger(this.dig(obj, path)))
319+
return JSON.stringify(this.dig(obj, path));
320+
return this.dig(obj, path);
321321
}
322322
323323
if(this.exactSearch){

0 commit comments

Comments
 (0)