DatatablesBundle icon indicating copy to clipboard operation
DatatablesBundle copied to clipboard

multiple multiselectaction with multiple datatables on the same page

Open darektw opened this issue 7 years ago • 0 comments

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'];

/**
 * {@inheritdoc}
 */
public function getName()
{
   return $this->dtName;
}

darektw avatar Jun 04 '17 09:06 darektw