PDF export page options
PDF export page options
bikramjitc
Posts: 6Questions: 0Answers: 0
in Buttons
Hi,
Can we make the page modifier option switch between "all" and "current" dynamically based on user input without reloading etc. ?
Replies
you could have two different buttons for the user to choose from.
Or you can add and drop buttons dynamically using:
https://datatables.net/reference/api/button().add() and this
https://datatables.net/reference/api/button().remove()
The exportOptions docs don't show that it will accept a function for the
selector-modifier
option. You could try an anonymous function to return the setting but it might not be applied dynamically.A better option might be to create two buttons; one for
all
and forcurrent
. If you don't want both displayed you could usebutton().add()
andbutton().remove()
to swap buttons based on the user input. Or you can usebutton.node()
to toggle a class that hides the buttons.Kevin