Looks like it is an issue with the Buttons / Foundation integration when using Foundation 5. If you use the release version of Buttons it works as expected: http://live.datatables.net/xuyizowa/4/edit .
I have done some work recently to try and get Buttons to work correctly with Foundation 6, since they changed a whole load of stuff. In the process I must have broken the Foundation 5 integration. I'll get it fixed before the next Buttons release.
Allan, thank you for the quick response. The dropdown button collection is now showing up and the events are firing, great stuff!!!
BUT
(there is always a but)
when I click on one of the buttons in the button collection, the dropdown doesn't close right away. If I then click on the filter box, then the button collection finally closes... Or is this the intended behavior, and I need code to close the collection when the user chooses one of the items in the collection or clicks away? Seems to me that would be automatic...
when I click on one of the buttons in the button collection, the dropdown doesn't close right away
This is intended behaviour, although it is something that I am thinking about adding an option for in future.
There are use cases for both automatic hiding and not - consider for example the column visibility where you might want to hide multiple columns, you would want the list to remain open for such a case.
The existing behaviour (dropdown doesn't close after item selection) is problematic when the collection contains Editing buttons, as the relevant editing dialog opens while the dropdown remains visible in front of the dimmed background. Also, the first click on the top right close-dialog button in the editor dialog requires two clicks if clicked immediately after the dialog opens (the first click event closes the dropdown and so gets trapped). Please allow an option to be set Allan!
Answers
Looks like it is an issue with the Buttons / Foundation integration when using Foundation 5. If you use the release version of Buttons it works as expected: http://live.datatables.net/xuyizowa/4/edit .
I have done some work recently to try and get Buttons to work correctly with Foundation 6, since they changed a whole load of stuff. In the process I must have broken the Foundation 5 integration. I'll get it fixed before the next Buttons release.
Thanks for letting me know about it.
Allan
Allan, thank you for the quick response. The dropdown button collection is now showing up and the events are firing, great stuff!!!
BUT
(there is always a but)
when I click on one of the buttons in the button collection, the dropdown doesn't close right away. If I then click on the filter box, then the button collection finally closes... Or is this the intended behavior, and I need code to close the collection when the user chooses one of the items in the collection or clicks away? Seems to me that would be automatic...
This is intended behaviour, although it is something that I am thinking about adding an option for in future.
There are use cases for both automatic hiding and not - consider for example the column visibility where you might want to hide multiple columns, you would want the list to remain open for such a case.
Allan
The existing behaviour (dropdown doesn't close after item selection) is problematic when the collection contains Editing buttons, as the relevant editing dialog opens while the dropdown remains visible in front of the dimmed background. Also, the first click on the top right close-dialog button in the editor dialog requires two clicks if clicked immediately after the dialog opens (the first click event closes the dropdown and so gets trapped). Please allow an option to be set Allan!
Illustration
Thanks for the image. i'll add an option for the next release of Buttons and post back here when it has been committed.
Allan
Excellent! Thanks.
Committed here. The new option for the
collection
button type isautoClose
. It isfalse
by default to match the current behaviour.Will be in the next release of Buttons which will happen int he next day or two.
Allan