'How to disable certain rows and columns at the same time

I'm a beginner in R shiny. I want to build an Shiny app where just some columns and rows can be editable. I understand how to disable some columns (thanks stackoverflow !) but I didn't find how to disable some rows at the same time. Is it possible ? Can you help me ?

library(shiny)
library(DT)
shinyApp(
  ui = fluidPage(DTOutput('tbl')),
  server = function(input, output) {
    output$tbl = renderDT(
      datatable(data = iris, 
                options = list(lengthChange = FALSE),
                editable = list(target = 'cell', disable = list(columns = c(1:3), rows = c(1:5))))
    )
  }
)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source