question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input/output ordering issues

See original GitHub issue

Hey @sa-si-dev , I don’t know how to properly communicate the issue here, because I’m not using virtual-select directly, I’m using it via shinyvs, which uses an R interface passing the parameters to virtual-select as the backend. So I’m sorry about that and I’m hope we can find a way to work around it.

The problem I’m facing is that virtual-select seems to force the input/tooltip label/output order to be the same as the one in value in options . I describe the matter in more details here https://github.com/dreamRs/shinyvs/issues/10 .

Is there a way to make the tooltip labels and the output to follow exactly the order of the input selected? I believe that is the standard behavior of other selectInput tools that I use, and it would be great to have an option to obtain that. virtual-select output order actually follows the input order selected later interactively but not the initial selected order passed to selectedValue.

Thanks a lot

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sa-si-devcommented, Feb 6, 2022

Hey @sa-si-dev , I don’t know how to properly communicate the issue here, because I’m not using virtual-select directly, I’m using it via shinyvs, which uses an R interface passing the parameters to virtual-select as the backend. So I’m sorry about that and I’m hope we can find a way to work around it.

The problem I’m facing is that virtual-select seems to force the input/tooltip label/output order to be the same as the one in value in options . I describe the matter in more details here https://github.com/dreamRs/shinyvs/issues/10 .

Is there a way to make the tooltip labels and the output to follow exactly the order of the input selected? I believe that is the standard behavior of other selectInput tools that I use, and it would be great to have an option to obtain that. virtual-select output order actually follows the input order selected later interactively but not the initial selected order passed to selectedValue.

Thanks a lot

@GitHunter0 thanks for letting me know it. I will implement it in the future release.

0reactions
GitHunter0commented, Mar 9, 2022

Hey @sa-si-dev , I came back to provide some feedback.

First, thanks again for the work.

I did some tests and I’m still having some issues. Here’s a MWE using R:

library(shiny)
library(shinyvs)

ui <- fluidPage(

  shinyvs::virtualSelectInput(
    inputId = "vs_inputs",
    label = NULL,
    choices = data.frame(
        label = c("lab1","lab2","lab3","lab4", "lab5"),
        value = c("val1","val2","val3","val4", "val5")
      ) |> purrr::transpose(),
    selected = c("val2", "val4", "val1"),
    search = TRUE,
    multiple=TRUE,
    popupDropboxBreakpoint = '5000px',
    showValueAsTags = TRUE,
   ),

  verbatimTextOutput("selected_items")
)

server <- function(input, output, session){
  output$selected_items <- renderText({input$vs_inputs})
}

shiny::shinyApp(ui, server)

Initial screen: output should be val2, val4, val1 (in some previous tests it was correct but not anymore for some unknown reason) image

After adding lab3: now the new input order is respected in the tooltip and output, but not in the popup. image

Then after closing lab2 by clicking x in tooltip tag, the tooltip and output change the order, so that lab3 and val3 are no longer the last. image

PS: As an aside, position parameter is doing nothing in my tests (without popup option), should I open an issue for that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The input/output complexity of sorting and related problems
We give two optimal algorithms for the problems, which are variants of merge sorting and distribution sorting. In particular we show for P ......
Read more >
The Input/Output Complexity of Sorting and Related Problems
In this article we present optimal bounds, up to a constant factor, for all values of M, B, and P for the following...
Read more >
How to Fix the Disk Input / Output Error in Windows
Five ⭐ methods to fix the I/O (input / output) error. ... Most of the time, they originate from hardware issues such as...
Read more >
Determining order of transaction inputs · Issue #106 - GitHub
TxIn is missing an index property, so it's currently not only possible to determine the sort order of the transaction inputs using a ......
Read more >
The Input-Output Problem: Managing the Military's Big Data in ...
In order to leverage joint resources (e.g., a request for Air Force close air support for an Army ground unit, or a request...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found