rubanraj54 / vue-bootstrap4-table

Advanced table based on Vue 2 and Bootstrap 4 ⚡️
MIT License
219 stars 57 forks source link

Filter type: "Float" #36

Closed marc-tech closed 5 years ago

marc-tech commented 5 years ago

Hi,

It is a very good job congratulation !!!

The only thing I need is to sort it by price because now the filter when I pass float numbers is wrong.

Example min to max: 15.99 2.99 25.99 ...

Maybe it can be regulated without new type or by adding a float type that takes 2.99 or 2.99. I hope I was enough clear :/ Thank you for your work !

rubanraj54 commented 5 years ago

Hi @marc-tech

I don't understand the problem. Are you saying the sort the not working properly for floating values?

But I tried an example with float values and its working good. You can have a look in this codepen example https://codepen.io/rubanraj54/pen/VNeLyV .

If you've other problems with float sorting, could you please make a codepen or fiddle example?

Cheers, Ruby.

marc-tech commented 5 years ago

Ah I see.. it's because my prices was in string :$ https://codepen.io/anon/pen/bJedrZ Thanks for your time ;)

rubanraj54 commented 5 years ago

Makes sense. Please convert the price values to float or number type before passing it to the table component.

I will close this issue now.

Cheers, Ruby,