-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove limit option in next&previous tab UI #1658
Conversation
Set default to 400 previous jobs and 100 next jobs. For more or less previous & next jobs query, use link with query parameters like following example: /tests/99945?previous_limit=10&next_limit=10#next_previous
Please start the display with the current job: https://datatables.net/reference/option/displayStart |
Codecov Report
@@ Coverage Diff @@
## master #1658 +/- ##
=========================================
- Coverage 88.96% 88.87% -0.1%
=========================================
Files 132 132
Lines 9468 9472 +4
=========================================
- Hits 8423 8418 -5
- Misses 1045 1054 +9
Continue to review full report at Codecov.
|
] | ||
], | ||
initComplete: function (settings, json) { | ||
// Seems an issue in case of displayStart is not an integer multiple of the pageLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, wouldn't it still be easier to take your var page as displayStart = page * pageLength? I find changing the table in initComplete a little problematic - as initComplete is called after the table was drawn, meaning it would blink
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didn't see blinking during initComplete called, from console no repeating draw shown.
test instance: http://10.67.18.160:3000/tests/72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options can't be changed after initialized, i wonder to know a better way to pass value to option during in initialisation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. So we would have to calculate this earlier - which would break lazy load.
Your test instance doesn't work for me and I'm in the middle of something else, so I can't test locally. So having to trust you that there is no blink :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work without blinking, also when 'Next & previous results' is the initial tab.
Set default to 400 previous jobs and 100 next jobs.
For more or less previous & next jobs query, use link with query parameters like following example:
/tests/99945?previous_limit=10&next_limit=10#next_previous