plotly / plotly/react-plotly.js
`onSelected`: Keep default behavior of events
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 1.1k
- Forks
- 138
- Merge médio
- 3d 2h
- PRs com merge (30d)
- 4
Descrição
Is there any way to keep the default behavior of events while providing a handler?
From what I understand from this post, unless the overridden function returns false the default behavior should be kept. However, when I provide an onSelected method the default behavior doesn't happen, no matter what the returned value is.
TBH, I'm not sure whether what I'm asking for is the expected behavior, but depending on the answer you can interpret this question as a feature request or a request for document clarification.
To make this more clear, what I see when onSelected is not provided is that the selected area stays active even after mouse is released and you can even select multiple regions like so:

However, when onSelected is provided, the selected region disappears after the mouse is released and I cannot reproduce the same behavior (at least not so easily).
To give you more context, my specific use-case here is to be able to download the information of the selected points using a separate button that I have created, so the default visual response works well for me.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
A issue não nomeia nenhum arquivo-fonte, teste ou ponto de entrada. Comece reproduzindo a diferença entre a seleção do Plotly sem um handler onSelected e com um, depois compare o comportamento de onSelected do componente com a documentação vinculada de eventos do Plotly. Considera-se concluído quando os elementos visuais padrão da região selecionada são preservados enquanto o evento é tratado, ou quando o comportamento esperado é documentado claramente.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, react
- Domínio
- data-visualization, frontend
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100