How to add Custom Dropdown/Select-Option with Button?
How to add Custom Dropdown/Select-Option with Button?

$(function () {
let dtButtons = $.extend(true, [], $.fn.dataTable.defaults.buttons)
let deleteButtonTrans = '{{ trans('global.datatables.delete') }}'
let deleteButton = {}
let addOutgoingButton = {
className: 'btn',
id: 'Dropdown'
}
dtButtons.push(deleteButton)
dtButtons.push(addOutgoingButton)
$.extend(true, $.fn.dataTable.defaults, {
order: [[ 1, 'desc' ]],
pageLength: 100,
});
})
I have added Custom Button like this. Is it possible to add Select-Option or Dropdown with this?
Or any other way?
Can I declare in outside the table but can I attach it with this button??
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I'm not following your questions, but take a look at multi-level Buttons collections - see example here.
That sounds like what you're looking for.
Colin
Thank you for your valuable answer. Yes I was searching for it.
But one more thing,
After selecting one of the option, then Collection will be disappear. How can I get it?
I'm not following, sorry. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin