wenzhixin/bootstrap-table

Search a number returns value.substring is not a function

mauri13k opened this issue · 2 comments

Bootstraptable version(s) affected

1.22.6

Description

I have an issue when searching a number (Uncaught TypeError: value.substring is not a function). My searchable data is a number and not string.
This must be a specific problem in my setup and i am not sure why i can't reproduce the issue in a sandbox.

Example(s)

No response

Possible Solutions

in bootstrap-table.js on line 1667 value should be a string to perform the substring function.

if (match) {
     searchText = value.toString().substring(match.index, match.index + searchText.length)
}

Additional Context

No response

As you already mentioned it seems this could be an issue of you're setup.
So it's not common that this is a bug.
We need a demo, without we can't try to fix something we can't test/verify.
If you're not able to reproduce it in our live editor, please generate a demo and upload this as zip.

We will close this issue, as we got no example from you.
If you still need help, please let us know!