DataTables / DataTables/Responsive
Bug: DataTable was not responsive on window resize
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 151
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
DataTable was not responsive on window resize, my DataTable was broken after i migrated it from v1.13.0 to v2.1.8. you can see it on https://youtu.be/8x7ezmTDig8.
This happend because this commit remove resize.dtr event listener for conditionally set the column visibility when window resized
My current workaround in my project:
$(window).on(
"resize.dtr",
DataTable.util.throttle(function () {
$(".dataTable").DataTable().responsive.recalc();
}),
);
My suggestion was to re-add resize.dtr back to global event listenr
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing commit 500fd1bc64639e733ca3ebf72996c7d05069447d and the window resize path involving responsive.recalc(); compare it with the reporter’s resize.dtr workaround. Done means a DataTable migrated from v1.13.0 to v2.1.8 remains responsive and updates its column visibility after a window resize.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100