Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding Multiple Table Rendering Feature #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
OzanKurt wants to merge 6 commits into yajra:master from OzanKurt:patch-2
Closed

Adding Multiple Table Rendering Feature #5

OzanKurt wants to merge 6 commits into yajra:master from OzanKurt:patch-2

Conversation

@OzanKurt
Copy link
Contributor

@OzanKurt OzanKurt commented Feb 10, 2017

Hi, I added support for rendering 2 tables in a single page.

The idea was pretty simple.

I had 2 tables in /users, ActiveUsersDataTable and InactiveUsersDataTable.

  • I added and id field to use in html part of the datatable so that the ids won't conflict.
  • I added ?tableId=TableID to each request so that we can define which table we're querying with the ajax request to the backend.
  • I edited the server-side.buttons.js to allow urls with a query parameter.

Copy link
Owner

yajra commented Feb 10, 2017

Note: This is in connection with yajra/laravel-datatables-buttons#5

I added ?tableId=TableID to each request so that we can define which table we're querying with the ajax request to the backend.

I think we should make this parameter optional. The PR will always add this parameter which is not needed by some of the users. This is also the reason why the test fails.

Copy link
Contributor Author

Yeah that can be optional for sure. Would you like to have a look yourself, or should I try?

Copy link
Owner

yajra commented Feb 10, 2017

Can you please try first. Having a lot of incoming task lately and I may not be able to look at this asap. Thanks!

Copy link
Contributor Author

@yajra Done some changes.

Copy link
Owner

yajra commented Feb 15, 2017

@OzanKurt thanks for the changes. Will try to check and release this within week.

return $this;
}

public function getQueryString()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for late response, I think this part may cause some breaking change? What if we already have a query string on our default URL?

'ajax' => '/data?user_id=1',
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, I had that issue and also updated accordingly. I am currently so overwhelmed by projects, sadly don't have time to re-think some code and push them.

Copy link
Contributor Author

OzanKurt commented Feb 20, 2017 via email

i believe added an exceptional functionality for that too, let me have a look and fix if not. Ozan Kurt
...
On 20 Feb 2017, at 12:59, Arjay Angeles ***@***.***> wrote: @yajra commented on this pull request. In src/Html/Builder.php: > $this->ajax = "$.fn.dataTable.pipeline({ url: '{$url}', pages: {$pages} })"; return $this; } + public function getQueryString() Sorry for late response, I think this part may cause some breaking change? What if we already have a query string on our default URL? 'ajax' => '/data?user_id=1', ... — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Copy link
Owner

yajra commented Oct 27, 2017

Sorry for overlooking this. Please submit a new PR if still interested to have this. Thanks!

@yajra yajra closed this Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@yajra yajra yajra left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /