Skip to content

Change SearchPanes Button text? #804

@mfherman

Description

@mfherman

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')
)

KAr3VQg

This was posted on RStudio Community but has not received any answers.


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('DT'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/DT').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions