How to disable the success message window of copy button action?
How to disable the success message window of copy button action?
Link to test case: https://live.datatables.net/kuqoqoce/1/watch?html,css,js,output
Description of problem:
I wonder how to elegantly disable the pop-up window on a successfully copied message?
I couldn't find any documentation on this and have to hide the window in a hack way with css.
I'm in transitioning to DT2.0, so I'm still using dom to set the layout for customization, and I've already done it for exporting excel and csv. But the pop-up window after copying became a problem for me.
Below is what I want to acheive with Tailwind integration:
I would like to have only the successful icon after copying instead of the pop-up window.
This question has an accepted answers - jump to answer
Answers
There is no option in the code to disable the popover message at the moment. I'd welcome a pull request that adds an option to the button which adds that ability though. Perhaps it could switch on if
buttons.copySuccess
is an empty string? No point in showing the model at that point!Allan
Thank you allan.
While I add the option to control it, I found it easier to implement by just adding an additional option, for example 'copySuccess' (or other names):
and then in the source code:
https://github.com/DataTables/Buttons/blob/c863eed3dcf6200ffa23f4917d4eda0c35fc03e4/js/buttons.html5.js#L918
change it to:
will work. What do you say?
I think that is fair, yes. If you send a PR with that change, I'll get it merged in
Allan
PR is made! https://github.com/DataTables/Buttons/pull/208
And merged - thanks for your contribution!