-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmethodized.R
More file actions
54 lines (36 loc) · 1.09 KB
/
methodized.R
File metadata and controls
54 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
needHack <- TRUE # change to false if problem referenced here is solved:
# https://groups.google.com/forum/#!topic/shiny-discuss/Lhdi7A_csR4
# Note that if needHack is true, you'll have to (I think) restart the shiny app
# in order for changes to the js file to take effect.
# if using the methodized version,
# start by sourcing this file.
# to use the old-school version, type
# runApp()
library(shiny)
source("global.R")
runApp(list(ui=
pageWithSidebar(
headerPanel("Data Tables binding"),
sidebarPanel(
p("Shift-Click to select multiple rows."),
actionButton("btnSend", "Send Rows"),
tags$button("Select All Rows", class="btn", id="select_all_rows"),
tags$button("Deselect All Rows", class="btn", id="deselect_all_rows")
),
mainPanel(
selDataTableOutput("myTable")
)
),
server=
function(input, output) {
output$myTable <- renderDataTable({mtcars}, options = list(bSortClasses = TRUE))
# observe({
# print("Click Event")
# print(input$myTable)
# })
observe({
if (input$btnSend > 0)
print(isolate(input$myTable))
})
})
)