OneWayTech / vue2-datatable

(DEPRECATED) The best Datatable for Vue.js 2.x which never sucks. Give us a star 🌟 if you like it!
MIT License
882 stars 230 forks source link

Bootstrap 4 compatibility #77

Open DSpeichert opened 6 years ago

DSpeichert commented 6 years ago

After struggling with the HeaderSettings component (the settings drop down was not opening), I realized this component depends on Bootstrap 3.

With Bootstrap 4, it is not opening the drop down without data-toggle="dropdown" on the button, and then with it, it's not opening the nested drop-down (for Save), it just closes the drop down completely. I'm quite sure that Bootstrap 4 does not support nested drop-downs.

kenberkeley commented 6 years ago

So, it seems that I have to revert this PR? https://github.com/OneWayTech/vue2-datatable/pull/62

DSpeichert commented 6 years ago

I don't think that one is related.

I fixed opening the settings drop down on this line: https://github.com/OneWayTech/vue2-datatable/blob/b076f1b4c3b786c0b33911bb7a9ebce5c70eb22c/src/HeaderSettings/index.vue#L3 (adding data-toggle="dropdown")

But then this one is broken, since it is nested: https://github.com/OneWayTech/vue2-datatable/blob/b076f1b4c3b786c0b33911bb7a9ebce5c70eb22c/src/HeaderSettings/index.vue#L20

kenberkeley commented 6 years ago

well... so it does not support BS4 actually...

DSpeichert commented 6 years ago

No, in fact it doesn't. I'm not sure it's quite possible to support both BS3 and BS4 at the same time. I'd recommend at least making it clear in the documentation for now that it specifically needs BS3.

kenberkeley commented 6 years ago

ok i will correct it tomorrow

chadidi commented 6 years ago

@kenberkeley Can you guys add support to BS4 ASAP, I know you can't support both BS3 and BS4 but you can make a branch for BS3 and the master for the latest bootstrap version.

Thanks

kenberkeley commented 6 years ago

https://github.com/OneWayTech/vue2-datatable/issues/116

kenberkeley commented 6 years ago

I not longer work for OneWay so you guys might have to on your own...

chadidi commented 6 years ago

Thanks for quick answer @kenberkeley. Who is the manager of the repository currently that can help us add BS4 support? or this repo is abandoned?

kenberkeley commented 6 years ago

I was the leader when in OneWay, now I left so nobody could handle... I am confident of this repo with BS3 so I will keep maintain it. In terms of BS4 compability, I hope you guys can help

chadidi commented 6 years ago

@kenberkeley OK I will try to do a pull request this weekend.

vrajroham commented 6 years ago

I managed to solve this by the following tweak, but applydropdown stopped working.

 // Added when table is rendered with little timeout
 $('div[name=HeaderSettings]').children('button[class*=dropdown-toggle]')[0].setAttribute('data-toggle','dropdown');
victorhramos commented 6 years ago

Adding to this subject, this component doesnt support bootstrap 4 tabs. If you use inside tabs tdComp and thComp wont work.

Look the difference image