Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single remove block input #115

Closed
DivadNojnarg opened this issue Dec 4, 2023 · 2 comments
Closed

Single remove block input #115

DivadNojnarg opened this issue Dec 4, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@DivadNojnarg
Copy link
Collaborator

Currently, if we want to remove a block, we click on the block remove button which is input$<stack_ID>_<block_ID>_remove. However, this is not very convenient to handle on the server side since we have to setup many observeEvent (one per button) and this is not ideal when adding new blocks. I would prefer having a single input$<stack_id>_block_remove which holds the index of the block to remove. Ideally, when we click on any remove button, we call Shiny.setInputValue('<stack_id>_block_remove', block_index) in an onclick event. This would allow to get rid of the "last "input changed" workaround.

Let me know what you think @JohnCoene

@DivadNojnarg DivadNojnarg added the enhancement New feature or request label Dec 4, 2023
@JohnCoene
Copy link
Member

Yes, we should do that.

@nbenn
Copy link
Collaborator

nbenn commented Dec 4, 2023

@DivadNojnarg A (semi) related issue might be that of name/ID responsibility: #112

Currently a block ID is a property of the block. Maybe it'd be better to have this be a property of the stack? Something we should discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants