Skip to content

material_text_box - new features : allow initial value, disabled, update value and update enable/disable#85

Open
bilbaoba wants to merge 2 commits intoericrayanderson:masterfrom
bilbaoba:text_box_initial_value
Open

material_text_box - new features : allow initial value, disabled, update value and update enable/disable#85
bilbaoba wants to merge 2 commits intoericrayanderson:masterfrom
bilbaoba:text_box_initial_value

Conversation

@bilbaoba
Copy link
Contributor

@bilbaoba bilbaoba commented Mar 11, 2019

Hi Eric & shinymaterial users,

I propose to answer issue #60 with this PR plus add some new features.

Changes :

  • New parameter value (by default "" like into the shiny function shiny::textInput()) and disabled into function material_text_box
  • New parameter disabled into function update_material_text_box
  • Update documentation
  • Improvement & simplification of code

Test :

After install the package :

library(shiny)
library(shinymaterial)

ui <- material_page(
  title = "Basic Page",
  tags$h1("Page Content"),
  material_card(
    title = 'test',
    material_text_box(input_id = 'test_text_box', label =  "test_text_box", value = "Some value", disable = TRUE),
    material_switch(input_id = "demo_switch", label = "disable ?", initial_value = TRUE),
    material_button(input_id = "change_value", label = "Change Value")
  )
)

server <- function(input, output, session) {
  observe({
    update_material_text_box(session, input_id = "test_text_box", disabled = input$demo_switch)
  })
  
  observe({
    if (input$change_value > 0)
      update_material_text_box(session, input_id = "test_text_box", value = "I love shinymaterial !")
  })
}

Best regards.

@bilbaoba
Copy link
Contributor Author

Hi @ericrayanderson,

I test this PR and it's working with the new version of package (v1.0.0).

Regards.

@bilbaoba bilbaoba force-pushed the text_box_initial_value branch from 22118ca to aa113bb Compare January 29, 2020 17:49
@bilbaoba bilbaoba changed the title Allow initial value into material_text_box material_text_box - new features : allow initial value, disabled, update value and update enable/disable Jan 30, 2020
@bilbaoba
Copy link
Contributor Author

bilbaoba commented Aug 26, 2020

Hi @ericrayanderson,

I saw you finally set value = "" into the function.

Are you interested by :

  • the ability to disable the material_text_box ?
  • update if It's disable or not ?
  • update the value ?

If yes, I will correct the conflict. And If not, I will close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant