Bootstrap 5 and DataTables 3
Bootstrap 5 and DataTables 3
BjornHa
Posts: 79Questions: 15Answers: 0
Testcase:: https://live.datatables.net/lohagado/1/edit
We have a combined use of inline and edit in some cases usning display "boostrap" together with floating labels and in these siituations I have noticed some things:
1) If you enter a field for inline editing directly, floating labels are not displayed. Howvever, if you have edited a row using the external editor, editing a field with inline editing afterward shows the floating label. Both works for me, but a consisten behaviour one or the other way would be nice.
2) A similar thing happens for the "remove" button, if the button is pressed before any external editor has been open the confirm text is not part of the form being displayed.
IF you have opened an external editor, the confirm text is there, however it is not visible... it has opacity set to 0
<div class="DTE_Form_Info" style="display: block; opacity: 0;">Är du säker på att du vill ta bort 1 rad?</div>
3) One more question in the same testcase, Editor defaults still on its own (DataTable.Editor.defaults) and not in a section of DataTables.defaults?
KR,
Bjørn Hasselberg
This question has accepted answers - jump to:
Answers
Hi Bjørn,
Thanks for your message.
1) Inline editing and floating labels. Yes, that's not very nice. It shouldn't really show the label for inline mode. I assume it probably did this in v2 as well (I don't immediately recall having tested inline editing with floating labels before). I'll have a look into what I can do about that.
2) Remove text not displaying. I may have recently committed a fix for that (via a different issue), but will check and let you know.
3). Editor default: Yes, the Editor defaults are on
DataTable.Editor.defaultssinceDataTable.Editoris its own class.Allan
2) An inline edit needs to happen first and then the delete action triggered. This happens on the DataTables default styling as well as Bootstrap 5 (and probably all the others). I was wrong, my other change didn't fix this. I will address this issue before the next release though (hopefully get it committed tomorrow - if things go well).
Allan
Super
Got one more tricky coming up regarding change trigger on nested DataTable fields but need to do some more investigations first ...
BTW, you were right about the floating labels, same behaviour in DataTables 2...