Long strings without space breaks responsive style
Long strings without space breaks responsive style
Hi!
I have long strings in my table (URL without whitespace or paths to a file or folder). Example:
"https://support.google.com/customsearch/answer/2649143?hl=en"
or
"/home/testuser/folderwithlongtext/anotherfolder/temp/testdocument.txt"
This breaks the responsive design.
Test:
- Open https://editor.datatables.net/ on mobile or Chrome / responsive window.
- Add the link above to the office field.
- Press the + button. Responsive design breaks.
What is the best way to handle this case? Render all data and check if string is to long and add whitespace? I want to show the complete string, I do not want to hide it in a <a href=...>.
This discussion has been closed.
Answers
That's interesting - thank you.
If you make even a 1px change in the screensize, Responsive recalculates the layout and correctly collapses the columns. So i'm thinking what probably needs to happen is that Responsive should either have a listener on
drawthat will always update the display on every draw (wanted to avoid that since it might not be required though and increases CPU load), or have a listener onsubmitCompletewhich would do the recalculation.The best option would really be to have DataTables trigger an
updatedevent, but that isn't going to be in until v2 unfortunately.Leaning toward
submitComplete- e.g.:Allan
This has now been addressed. We'll be making releases this afternoon and this will be included in it,
Colin