Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CSIRO-INRA
landsepi
Commits
bcc29bcb
Commit
bcc29bcb
authored
May 25, 2021
by
Jean-Francois Rey
☕
Browse files
shiny: bugfix observe event at trigger for table DT
parent
9f0512cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
inst/shiny-landsepi/modules/editableDT.R
View file @
bcc29bcb
...
...
@@ -142,7 +142,7 @@ editableDTServer <- function(id, DTdata, disableCol = shiny::reactiveVal(c()), c
## force reactive value return
#shiny::observe({ rv$value <- rv$data[i, j]})
# on met a jour le tableau cote client (normalement il n'y a pas de changement mais ca sera à jour)
#
DT::replaceData(proxy = proxy, data = rv$data
()
, resetPaging =
FALS
E, rownames =
FALSE
)
#DT::replaceData(proxy = proxy, data = rv$data, resetPaging =
TRU
E, rownames =
rownames
)
})
# On assume que du moment qu'on peut ajouter une ligne on peut en supprimer une via la
...
...
inst/shiny-landsepi/server.R
View file @
bcc29bcb
...
...
@@ -815,7 +815,7 @@ server <- function(input, output, session) {
)
##### croptypes table modification #####
shiny
::
observeEvent
(
croptypesTable
$
value
,
shiny
::
observeEvent
(
croptypesTable
$
data
,
{
message
(
"Croptypes update"
)
...
...
@@ -839,6 +839,8 @@ server <- function(input, output, session) {
can_gen_landscape
$
croptypeID
<<-
FALSE
}
else
{
#print(croptypesTable$data)
#summary(croptypesTable$data)
simul_params
<<-
setCroptypes
(
simul_params
,
croptypesTable
$
data
[,
1
:
(
ncol
(
croptypesTable
$
data
)
-
2
)])
can_run_simul
$
croptypes
<<-
TRUE
can_gen_landscape
$
croptypeID
<<-
TRUE
...
...
@@ -866,7 +868,7 @@ server <- function(input, output, session) {
)
##### cultivars table modification #####
shiny
::
observeEvent
(
cultivarsTable
$
value
,
shiny
::
observeEvent
(
cultivarsTable
$
data
,
{
message
(
"Cultivars update"
)
...
...
@@ -933,7 +935,7 @@ server <- function(input, output, session) {
)
##### cultivars genes table modification #####
shiny
::
observeEvent
(
cultivars_genesTable
$
value
,
shiny
::
observeEvent
(
cultivars_genesTable
$
data
,
{
message
(
"Cultivars genes update"
)
...
...
@@ -978,7 +980,7 @@ server <- function(input, output, session) {
)
##### Genes table modification #####
shiny
::
observeEvent
(
genesTable
$
value
,
shiny
::
observeEvent
(
genesTable
$
data
,
{
message
(
"Genes update"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment