This repository was archived by the owner on Feb 4, 2023. It is now read-only.
multiple multiselectaction with multiple datatables on the same page#626
Open
darektw wants to merge 2 commits intostwe:masterfrom
Open
multiple multiselectaction with multiple datatables on the same page#626darektw wants to merge 2 commits intostwe:masterfrom
darektw wants to merge 2 commits intostwe:masterfrom
Conversation
each datatable should have different name
darektw
commented
Jun 4, 2017
|
|
||
| {% if sg_datatables_view.columnBuilder.uniqueColumn('multiselect') is not null %} | ||
| {{ sg_datatables_render_multiselect_actions( sg_datatables_view.columnBuilder.uniqueColumn('multiselect'), sg_datatables_view.ajax.pipeline) }} | ||
| {{ sg_datatables_render_multiselect_actions( sg_datatables_view.columnBuilder.uniqueColumn('multiselect'), sg_datatables_view.ajax.pipeline, sg_datatables_view.name) }} |
Contributor
Author
There was a problem hiding this comment.
In this place sg_datatables_view.name has correct suffixed datatablename
darektw
commented
Jun 4, 2017
| $actions = $this->accessor->getValue($multiselectColumn, 'actions'); | ||
| $domId = $this->accessor->getValue($multiselectColumn, 'renderActionsToId'); | ||
| $datatableName = $this->accessor->getValue($multiselectColumn, 'datatableName'); | ||
| $datatableName = $datatableName ?: $this->accessor->getValue($multiselectColumn, 'datatableName'); |
Contributor
Author
There was a problem hiding this comment.
$this->accessor->getValue($multiselectColumn, 'datatableName'); return always dtatablename from contructor, without suffix, so i need to pass an extra parameter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of all thakns for Your Great job, it's awesome bundle.
I had a problem with multiple datatables generated for each category, i needed display them on one page. It works but without multiselect actions.
In my case there is one original databele and multiple tabs with dynamic datatables created from original datatable. I pass an extra parameter in bulidDatatable method to suffix datatablename.
The code below explain how it works.
The code in pull request is the hotfix to resolve the problem.
The question is how do it better :)
// in controler$datatable->buildDatatable(['category_slug' => $query_cslug]);// in datatable$this->dtName = 'media_datatable_' . $options['category_slug'];