rubanraj54 / vue-bootstrap4-table

Advanced table based on Vue 2 and Bootstrap 4 ⚡️
MIT License
220 stars 58 forks source link

action button ccs #25

Closed daoudzd closed 5 years ago

daoudzd commented 5 years ago

hi, is there any way to change actions button css classes, if not can you provide an option to change class="btn btn-primary" to something else?

rubanraj54 commented 5 years ago

Hi @daoudzd

Currently there is no way, but I can add this feature in my next release.

Cheers, Ruby.

rubanraj54 commented 5 years ago

Hey @daoudzd

This feature is rolled out in new release 1.1.2. Note that, still this is not yet documented in Readme.

Example:

actions: [
    {
        btn_text: '<span>Download <i class="fas fa-download"></i></span>',
        class: "btn btn-primary my-custom-class",
        event_name: "on-download",
        event_payload: {
            msg: "my custom msg"
        }
    }
]

Cheers, Ruby.

daoudzd commented 5 years ago

thank you

daoudzd commented 5 years ago

i tested it in https://codepen.io/rubanraj54/pen/zyZdzN and found that class: "btn btn-primary" is working but

but btn_text: '<span>Download <i class="fas fa-download"></i></span>', is not working

daoudzd commented 5 years ago

and noticed that buttons ccs in filter changed from image

to

image

rubanraj54 commented 5 years ago

i tested it in https://codepen.io/rubanraj54/pen/zyZdzN and found that class: "btn btn-primary" is working but

but btn_text: '<span>Download <i class="fas fa-download"></i></span>', is not working

Hi @daoudzd ,

I didn't updated new version in the codepen. That's why it wasn't working there.

I made a codepen example here https://codepen.io/rubanraj54/pen/Oqvgwj .

And note that, if you want to show the icon you should include some icon packages in your project. In my example I used fontawesome css package to show download icon.

rubanraj54 commented 5 years ago

and noticed that buttons ccs in filter changed from image

to

image

you can take a look at this issue #12 for more details why I change the design. Also now it is configurable to enable or disable clear buttons in global search and simple filter, and also you can override the clear button icon for your choice.