vue2-datatable icon indicating copy to clipboard operation
vue2-datatable copied to clipboard

Bootstrap 4 compatibility

Open DSpeichert opened this issue 7 years ago • 13 comments

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.

DSpeichert avatar Feb 26 '18 04:02 DSpeichert

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

kenberkeley avatar Feb 26 '18 04:02 kenberkeley

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

DSpeichert avatar Feb 26 '18 04:02 DSpeichert

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

kenberkeley avatar Feb 26 '18 04:02 kenberkeley

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.

DSpeichert avatar Feb 26 '18 13:02 DSpeichert

ok i will correct it tomorrow

kenberkeley avatar Feb 26 '18 13:02 kenberkeley

@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

chadidi avatar May 18 '18 14:05 chadidi

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

kenberkeley avatar May 18 '18 14:05 kenberkeley

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

kenberkeley avatar May 18 '18 14:05 kenberkeley

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?

chadidi avatar May 18 '18 15:05 chadidi

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

kenberkeley avatar May 18 '18 15:05 kenberkeley

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

chadidi avatar May 18 '18 15:05 chadidi

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');

vrajroham avatar Jun 19 '18 07:06 vrajroham

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

victorhramos avatar Aug 21 '18 14:08 victorhramos