djk2 / django-tables2-column-shifter

Simple extension for django-tables2 can dynamically show or hide columns. Using JQuery, Bootstrap 3, Bootstrap 4, Bootstrap 5 and Django >=1.9
BSD 3-Clause "New" or "Revised" License
21 stars 8 forks source link

Support bootstrap 5 #19

Closed spapas closed 3 years ago

spapas commented 3 years ago

This is related to issue #18 (it seems that for each version of bootstrap you'll need to have a different template) ...

In any case, for the popup to work this bootstrap 5 you need to change

data-toggle="dropdown"

to

data-bs-toggle="dropdown"

in the columns button:

                <button type="button" class="{{ table.get_dropdown_button_css }} dropdown-toggle"
                        data-bs-toggle="dropdown"
                        aria-haspopup="true"
                        aria-expanded="false"
djk2 commented 3 years ago

Hi. I just started work on support for bootstrap 5. I hope that new extension won't force me to break compatibility.

djk2 commented 3 years ago

Support for bootstrap5 was added in version 2.0 of django-tables2-column-shifter. I also pushed new version to pypi: https://pypi.org/project/django-tables2-column-shifter/