change of input to clear text

I have a button (input$savemodel_button), which when pressed, will write a text to SaveModel_text, as below:

savemodeltext <- eventReactive(input$savemodel_button, {
  blah blah...
  filename <- as.character(L5[2])
  savemodeltext <- paste0('Model saved to pickle file ',filename)
output$SaveModel_text <- renderText({
  savemodeltext <- savemodeltext()

Which the above serves the purpose I want. However, I need to implement anothet feature to clear that text when there is a change of input (input$change)

observeEvent(input$change, {
  ## need to clear SaveModel_text to blank where there is a change of input.

Does observeEvent serves my purpose here? if yes, what is the needed code inside to clear the text?

Or should I use updateTextInput as below?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.