@@ -243,23 +243,20 @@ TealAppDriver <- R6::R6Class( # nolint: object_name.
243
243
self $ get_value(output = sprintf(" %s-%s" , self $ active_module_ns(), output_id ))
244
244
},
245
245
# ' @description
246
- # ' Get the output from the module's `teal.widgets::table_with_settings` in the `teal` app.
246
+ # ' Get the output from the module's `teal.widgets::table_with_settings` or `DT::DTOutput` in the `teal` app.
247
247
# ' This function will only access outputs from the name space of the current active teal module.
248
248
# '
249
- # ' @param tws (`character(1)`) `table_with_settings` namespace name.
249
+ # ' @param table_id (`character(1)`) The id of the table in the active teal module's name space .
250
250
# ' @param which (integer) If there is more than one table, which should be extracted.
251
+ # ' By default it will look for a table that is built using `teal.widgets::table_with_settings`.
251
252
# '
252
253
# ' @return The data.frame with table contents.
253
- get_active_module_tws_output = function (tws , which = 1 ) {
254
+ get_active_module_table_output = function (table_id , which = 1 ) {
254
255
checkmate :: check_number(which , lower = 1 )
255
- checkmate :: check_string(tws )
256
- table <-
257
- rvest :: html_table(
258
- self $ get_html_rvest(
259
- self $ active_module_element(sprintf(" %s-table-with-settings" , tws ))
260
- ),
261
- fill = TRUE
262
- )
256
+ checkmate :: check_string(table_id )
257
+ table <- self $ active_module_element(table_id ) %> %
258
+ self $ get_html_rvest() %> %
259
+ rvest :: html_table(fill = TRUE )
263
260
if (length(table ) == 0 ) {
264
261
data.frame ()
265
262
} else {
@@ -270,13 +267,13 @@ TealAppDriver <- R6::R6Class( # nolint: object_name.
270
267
# ' Get the output from the module's `teal.widgets::plot_with_settings` in the `teal` app.
271
268
# ' This function will only access plots from the name space of the current active teal module.
272
269
# '
273
- # ' @param pws (`character(1)`) `plot_with_settings` namespace name.
270
+ # ' @param plot_id (`character(1)`) The id of the plot in the active teal module's name space .
274
271
# '
275
272
# ' @return The `src` attribute as `character(1)` vector.
276
- get_active_module_pws_output = function (pws ) {
277
- checkmate :: check_string(pws )
273
+ get_active_module_plot_output = function (plot_id ) {
274
+ checkmate :: check_string(plot_id )
278
275
self $ get_attr(
279
- self $ active_module_element(sprintf(" %s-plot_main > img" , pws )),
276
+ self $ active_module_element(sprintf(" %s-plot_main > img" , plot_id )),
280
277
" src"
281
278
)
282
279
},
0 commit comments