Why doesn't my button collection show up?

Why doesn't my button collection show up?

vincellcvincellc Posts: 10Questions: 3Answers: 0

Why doesn't button collection show up right?

Here is the JS Bin showing my problem

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    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

  • vincellcvincellc Posts: 10Questions: 3Answers: 0

    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...

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Answer ✓

    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.

    Allan

  • bigbenchrobbigbenchrob Posts: 26Questions: 9Answers: 2

    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!

  • bigbenchrobbigbenchrob Posts: 26Questions: 9Answers: 2
  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    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

  • bigbenchrobbigbenchrob Posts: 26Questions: 9Answers: 2

    Excellent! Thanks.

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Answer ✓

    Committed here. The new option for the collection button type is autoClose. It is false 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

This discussion has been closed.