Sology / smart_listing

Ruby on Rails data listing gem with built-in sorting, filtering and in-place editing.
http://showcase.sology.eu/smart_listing
MIT License
478 stars 138 forks source link

Multiple params doesnt work after search #144

Closed Kani999 closed 6 years ago

Kani999 commented 6 years ago

I have code like this

    ldapusers = Ldapuser.all

    ldapusers = ldapusers.search(params[:filter]) if params[:filter]
    ldapusers = ldapusers.status(params[:status]) if params[:status]

    @ldapusers = smart_listing_create(:ldapusers,
                                      ldapusers,
                                      partial: "ldapusers/list",
                                      default_sort: { login: "asc" })

I pass status parameter and the right records are selected. But when I use Search, the params[:status] is not functional.

Can I add some code to javascript for keeping my scope functional after searching something?

Kani999 commented 6 years ago

I've got issue in haml.