bogdan / datagrid

Gem to create tables grids with sortable columns and filters
MIT License
1.02k stars 116 forks source link

Two Grids Same Data #231

Closed haydencarlson closed 7 years ago

haydencarlson commented 7 years ago

Grid 1

Grid 2

As you can see grid one is working great.

Both of these grids run off the same data just the second grids data has a flag separating it from the other data. (Sandbox data)

Here is my controller.

      @grid = TransactionsGrid.new(params[:transactions_grid]) do |scope|
        scope.where(user_id: current_user.id, is_sandbox: false)
      end

      @sandbox_grid = SandboxTransactionsGrid.new(params[:sandbox_transactions_grid]) do |scope|
        scope.where(user_id: current_user.id)
      end

For whatever reason the pagination is not working for grid 2. The second grid will just display all the data on the same page. Has anyone experienced this and/or could afford me a quick response/solution.