ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

Assignment version of `addAttribs` #96

Open nfultz opened 6 years ago

nfultz commented 6 years ago

I saw this line of code when reading your packaged, :

            panels[[i]]$children[[1]]$children[[1]]$children[[1]] <- addAttribs(panels[[i]]$children[[1]]$children[[1]]$children[[1]], 
                `data-parent` = paste0("#", id))

you might be happier having an assignment version of addAttribs, maybe something like:

`addAttribs<-` <- function(x,a) {
   do.call(addAttribs, x, a)
}

I think you need a do.call there since you are using the names of ... but haven't tried it out myself.

Thanks!