When trying to remove a tag using the remove method I'm getting the following error. This error is not being raised when I'm trying to remove other tags from the same object.
Error in child$envKey : object of type 'closure' is not subsettable
Steps to reproduce - Trying to remove the label from the selectInput widget
# get the selectInput
html <- selectInput("select_id", "label", letters)
# Remove the label
tagQuery(html)$
find("label")$
remove()
More info
My attempt at debugging
I found that when the error is raised the selectedWalkIRev function is calling func(els, fn) in its body. The error is raised when within this function we are trying to get the envKey attribute therefore raising the aforementioned error.
The cause when this is happening is that we are passing a function in the els list which I suppose is being brought from before, upper in the call stack. (See the third element below)
The problem
When trying to remove a tag using the
remove
method I'm getting the following error. This error is not being raised when I'm trying to remove other tags from the same object.Steps to reproduce - Trying to remove the label from the selectInput widget
More info
My attempt at debugging
I found that when the error is raised the
selectedWalkIRev
function is callingfunc(els, fn)
in its body. The error is raised when within this function we are trying to get theenvKey
attribute therefore raising the aforementioned error.The cause when this is happening is that we are passing a function in the
els
list which I suppose is being brought from before, upper in the call stack. (See the third element below)R version and package version
R version 4.2.1 htmltools 0.5.3
Traceback