Skip to content

Commit 69ba727

Browse files
committed
Review Update
1 parent 11af9f0 commit 69ba727

2 files changed

Lines changed: 6 additions & 32 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
![Codecov test coverage](https://codecov.io/gh/Appsilon/reactable.extras/branch/main/graph/badge.svg)
99
<!-- badges: end -->
1010

11-
`reactable.extras` is an R package that enhances the functionality of the `reactable` package in Shiny applications. Reactable tables are interactive customizable, and `reactable.extras` extend their capabilities, allowing you to create dynamic and interactive data tables with ease.
11+
`reactable.extras` is an R package that enhances the functionality of the [reactable](https://glin.github.io/reactable/) package in Shiny applications. Reactable tables are interactive customizable, and `reactable.extras` extend their capabilities, allowing you to create dynamic and interactive data tables with ease.
1212

1313
In the context of web apps, you often need to provide users with additional tools and interactivity for data exploration. `reactable.extras` address this need by offering a set of functions and components that can be seamlessly integrated into your Shiny apps.
1414

vignettes/tutorial/custom-inputs.rmd

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -137,32 +137,6 @@ shinyApp(
137137

138138
![](images/custom-inputs.gif)
139139

140-
Example of saving the state when changing the page:
141-
142-
```R
143-
# helper function
144-
update_table <- function(data, id, column, value, key_column = NULL) {
145-
if (!is.null(key_column)) {
146-
data[data[[key_column]] == id, column] <- value
147-
} else {
148-
data[id, column] <- value
149-
}
150-
return(data)
151-
}
152-
153-
# in server.R
154-
values <- input$text
155-
updateReactable(
156-
"react",
157-
data = update_table(
158-
df,
159-
values$row,
160-
values$column,
161-
values$value
162-
)
163-
)
164-
```
165-
166140

167141
You can also use `{tippy}` to add tooltips to your reactable columns:
168142

@@ -200,28 +174,28 @@ shinyApp(
200174
data = df,
201175
columns = list(
202176
Manufacturer = colDef(
203-
header = tooltip_extra("tooltip", content = "Manufacturer type"), #tooltip
177+
header = tooltip_extra(content = "Manufacturer type"), #tooltip
204178
cell = button_extra("button", class = "button-extra")
205179
),
206180
Check = colDef(
207-
header = tooltip_extra("tooltip", content = "Checkbox"),
181+
header = tooltip_extra(content = "Checkbox"),
208182
cell = checkbox_extra("check", class = "checkbox-extra"),
209183
align = "left"
210184
),
211185
Date = colDef(
212-
header = tooltip_extra("tooltip", content = "Date input"),
186+
header = tooltip_extra(content = "Date input"),
213187
cell = date_extra("date", class = "date-extra")
214188
),
215189
Type = colDef(
216-
header = tooltip_extra("tooltip", content = "Type dropdown"),
190+
header = tooltip_extra(content = "Type dropdown"),
217191
cell = dropdown_extra(
218192
"dropdown",
219193
unique(df$Type),
220194
class = "dropdown-extra"
221195
)
222196
),
223197
Model = colDef(
224-
header = tooltip_extra("tooltip", content = "Model input"),
198+
header = tooltip_extra(content = "Model input"),
225199
cell = text_extra(
226200
"text"
227201
)

0 commit comments

Comments
 (0)