button dropdown-toggle

button dropdown-toggle

Massimo1974Massimo1974 Posts: 27Questions: 2Answers: 0

I would like to create a place for this button collection a dropdown-toggle do you know how to do ???
this works but only a design problem,

                buttons: [
                    {
                      extend: 'collection',
                      className: 'btn btn-outline-warning dropdown-toggle stars',
                      text: '<span class="btn-label"><i class="fa fa-star" >  Preferiti</i></span>',
                      buttons: [
                                  {
                                    className: 'btn btn-outline-warning',
                                    titleAttr: 'Preferiti',
                                    text: '<span class="btn-label"><i class="fa fa-star" > Solo Preferiti</i></span>',
                                    action: function (dt) {
                                      var table = $('#datatable').DataTable();
                                      table.columns(1).search(1, true, false, true).draw();
                                      $('#pref').parent().addClass("active");
                                    }
                                  },
                                  {
                                  className: 'btn btn-outline-warning',
                                  titleAttr: 'Tutti',
                                  text: '<span class="btn-label"><i class="fa fa-star-half-o" > Tutti</i></span>',
                                  action: function (dt) {
                                      var table = $('#datatable').DataTable();
                                      table.columns(1).search('', true, false, true).draw();
                                    }
                                  },
                                  {
                                  className: 'btn btn-outline-warning',
                                  titleAttr: 'Non Preferiti',
                                  text: '<span class="btn-label"><i class="fa fa-star-o" > Non Preferiti</i></span>',
                                  action: function (dt) {
                                      var table = $('#datatable').DataTable();
                                      table.columns(1).search(0, true, false, true).draw();
                                    }
                                  }
                                ],
                  },

Replies

This discussion has been closed.