Skip to content

Commit

Permalink
Merge pull request #13 from NorwegianVeterinaryInstitute/trish-filter
Browse files Browse the repository at this point in the history
Add a filter
  • Loading branch information
trishangu authored Sep 26, 2024
2 parents 32be13a + 4452b0d commit 1d09dcd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mod_mainPanel.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ mainPanelServer <- function(id, board) {
name = paste0(Sys.getenv("USER_NAME"), '/cake_user_inputs'),
interval = 1000
)
# Hide secret ingredient
pinned_cakes <- pinned_cakes()[,c(1:5,7)]
datatable(
pinned_cakes,
# Do not show row names
rownames = FALSE,
# Add filters for each column
filter = "top",
colnames = c(
"Date",
"Hour",
Expand All @@ -29,6 +33,8 @@ mainPanelServer <- function(id, board) {
"Cake Description"
),
options = list(
# order table by date and then time
order = list(list(0, 'asc'), list(1, 'asc')),
columnDefs = list(
list(targets = '_all', className = 'dt-center')
))
Expand Down

0 comments on commit 1d09dcd

Please sign in to comment.