Change SearchPanes button text in DT

I'm using the new SeachPanes feature from DT along with the Buttons extension and I'm having trouble changing the text displayed on the SearchPanes button.

For other buttons, I can change the button text by using the text argument, but when I try this for SearchPanes, I can't change the text. See below for an example where I change the text of the Copy button to "Hi!", but the same does not work with the SearchPanes button.

library(DT)

datatable(
 iris,
 options = list(
   dom = 'Bfrtip',
   columnDefs = list(list(searchPanes = list(show = FALSE), targets = 1:4)),
   buttons = list(
     list(extend = "searchPanes", text = "Filter"),
     list(extend = "copy", text = "Hi!"))
   ),
 extensions = c('Select', 'SearchPanes', 'Buttons')
)

Created on 2020-04-26 by the reprex package (v0.3.0)

Answered on DT GitHub!

library(DT)

datatable(
  iris,
  options = list(
    dom = 'Bfrtip',
    columnDefs = list(list(searchPanes = list(show = FALSE), targets = 1:4)),
    buttons = list(
      'searchPanes',
      list(extend = "copy", text = "Hi!")),
    language = list(searchPanes = list(collapse = 'filter'))
  ),
  extensions = c('Select', 'SearchPanes', 'Buttons')
)

Created on 2020-04-28 by the reprex package (v0.3.0)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.