Bootstrap table responsive popover clipping
Bootstrap table responsive popover clipping
alenb
Posts: 7Questions: 3Answers: 0
Here's a fiddle which illustrates the problem: https://jsfiddle.net/ujj3zkdq/
This discussion has been closed.
Answers
This becomes a huge issue on mobile. Is there no fix for this at all?
I don't believe this is a DataTables issue I'm afraid, but rather one in Bootstrap. bootstrap uses:
If you remove the two overflow statements, it works as expected.
You can reproduce the issue without DataTables: https://jsfiddle.net/ujj3zkdq/1/ . I've just added a
row
andcol-sm-12
into the responsive table. I'm guessing Bootstrap's responsive tables possibly were not designed to be used like that.Allan
That's the purpose of
.table-responsive
within Bootstrap. It allows the table to work on mobile. Removing the overflow defeats the purpose....
Seems like Datatables is doing something it shouldn't be then. Why use row/cols inside a responsive wrapper that's only meant to be used with tables?
Bit of a cliffhanger moment. Any ideas for a workaround?
Yes, use
dom
and have it not use Bootstrap's rows and columns markup. Thedom
documentation shows the default string for Bootstrap.Its being used inside a
div
container - DataTables doesn't know that it is in a responsive table container. Perhaps it need a check for that, but then it wouldn't be able to correctly layout the search box etc. Perhaps a better fix would be to use:(yes it hurts the eyes - sorry). Basically that will put the table in a
responsive
classdiv
inside the structure that DataTables controls. So you would still just have<table>
rather than the responsive container.Allan