Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
Using Selectpicker for filter-control

I am using bootstrap-select in a <select> that serves as a filter-control component of a bootstrap table.

I want to use this select to filter via various types of cars, not only one.

I have everything working but, when I select one or more types of cars, this error shows up in the browsers' console:

Uncaught TypeError: a.trim is not a function

It is retrieving the error from the bootstrap-table script:

https://unpkg.com/bootstrap-table@1.19.1/dist/extensions/filter-control/bootstrap-table-filter-control.min.js:10

Might it be that it is returning an array while the script wants a string? (Arrays do not have a trim function). In that case, can I patch it so it returns a joined array? It does not seem to be the case since the error is thrown even if I change the value like this:

let stringVal = multiSelect.val().join()
multiSelect.val(stringVal)

Any advice would be appreciated.


BTW, this can also be applied to simple input filters, could I find by more than one criteria in that case?

Like what combination of chars should I insert in the search input so it looks for those two? Is this even possible?

Example(s)

sedan|coupe sedan&coupe sedan,coupe sedan, coupe

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!