Skip to content

Commit

Permalink
Merge pull request #150 from openpharma/jt-fix_pageLength_bug
Browse files Browse the repository at this point in the history
Fix `pageLength` bug
  • Loading branch information
LDSamson authored Dec 17, 2024
2 parents 78ad0cf + 8ba71a2 commit d5b80d2
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: clinsight
Title: ClinSight
Version: 0.1.1.9011
Version: 0.1.1.9012
Authors@R: c(
person("Leonard Daniël", "Samson", , "[email protected]", role = c("cre", "aut"),
comment = c(ORCID = "0000-0002-6252-7639")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
## Bug fixes

- The test-coverage GHA workflow is updated so that codecov uploads work again.
- Display all rows for tables where `Scroller` is disabled.

# clinsight 0.1.1

Expand Down
5 changes: 4 additions & 1 deletion R/mod_navigate_review.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ mod_navigate_review_server <- function(
datatable_custom(
queries_table_data(),
rename_vars = table_names,
options = list(scroller = FALSE),
options = list(
scroller = FALSE,
pageLength = -1
),
rownames = FALSE,
selection = "none"
)
Expand Down
5 changes: 4 additions & 1 deletion R/mod_queries.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ mod_queries_server <- function(id, r, navinfo, all_forms, db_path, table_names){
selected_query_data()[c("query", "reviewer")],
rename_vars = table_names,
dom = 't',
options = list(scroller = FALSE),
options = list(
scroller = FALSE,
pageLength = -1
),
class = "row-border hover",
rownames = FALSE,
selection = "none"
Expand Down
2 changes: 1 addition & 1 deletion inst/golem-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default:
golem_name: clinsight
golem_version: 0.1.1.9011
golem_version: 0.1.1.9012
app_prod: no
user_identification: test_user
study_data: !expr clinsight::clinsightful_data
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/_snaps/app_feature_03/app-feature-3-003.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
"scrollResize": true,
"scrollCollapse": true,
"colReorder": true,
"pageLength": -1,
"initComplete": "function() {\n$(this.api().table().container()).find('.header').html(\"\")\n}",
"dom": "<\"header h5\">t",
"columnDefs": [
Expand All @@ -254,6 +255,13 @@
],
"autoWidth": false,
"orderClasses": false,
"lengthMenu": [
-1,
10,
25,
50,
100
],
"ajax": {
"type": "POST",
"data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = true;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/_snaps/app_feature_03/app-feature-3-004.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
"scrollResize": true,
"scrollCollapse": true,
"colReorder": true,
"pageLength": -1,
"initComplete": "function() {\n$(this.api().table().container()).find('.header').html(\"\")\n}",
"dom": "<\"header h5\">t",
"columnDefs": [
Expand All @@ -254,6 +255,13 @@
],
"autoWidth": false,
"orderClasses": false,
"lengthMenu": [
-1,
10,
25,
50,
100
],
"ajax": {
"type": "POST",
"data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = true;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/_snaps/app_feature_03/app-feature-3-005.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
"scrollResize": true,
"scrollCollapse": true,
"colReorder": true,
"pageLength": -1,
"initComplete": "function() {\n$(this.api().table().container()).find('.header').html(\"\")\n}",
"dom": "<\"header h5\">t",
"columnDefs": [
Expand All @@ -258,6 +259,13 @@
],
"autoWidth": false,
"orderClasses": false,
"lengthMenu": [
-1,
10,
25,
50,
100
],
"ajax": {
"type": "POST",
"data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = true;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"scrollResize": true,
"scrollCollapse": true,
"colReorder": true,
"pageLength": -1,
"initComplete": "function() {\n$(this.api().table().container()).find('.header').html(\"\")\n}",
"dom": "f<\"header h5\">ti",
"columnDefs": [
Expand All @@ -41,6 +42,13 @@
],
"autoWidth": false,
"orderClasses": false,
"lengthMenu": [
-1,
10,
25,
50,
100
],
"ajax": {
"type": "POST",
"data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = true;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}"
Expand Down

0 comments on commit d5b80d2

Please sign in to comment.