fix: corrige quebra de busca quando nenhuma opção é encontrada#1065
Merged
ezequias21 merged 5 commits intomainfrom Mar 11, 2026
Merged
fix: corrige quebra de busca quando nenhuma opção é encontrada#1065ezequias21 merged 5 commits intomainfrom
ezequias21 merged 5 commits intomainfrom
Conversation
Contributor
Greptile SummaryEste PR corrige uma quebra no componente Principais mudanças:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| src/components/Select.vue | Correção da quebra de busca quando nenhuma opção é encontrada: adicionados isTyping e internalInputValue para controle do estado do input, computedModel convertido para computed com getter/setter, proteção contra crash no activateSelectionOnEnter com lista vazia, retorno antecipado em filterOptions para evitar re-filtragem redundante, e limpeza explícita de estado (isTyping, active) em selectItem e hide. Pequena inconsistência: uso de !active.value (toggle) em vez de active.value = false em selectItem. |
| package.json | Bump de versão de 3.154.8 para 3.154.9 (patch), refletindo o fix realizado no componente Select. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A([Usuário digita]) --> B[computedModel setter\nisTyping = true\ninternalInputValue = val]
B --> C[filterOptions chamado]
C --> D{val igual ao\nvalor selecionado?}
D -- Sim --> E[Retorno antecipado\nlocalOptions inalterado]
D -- Não --> F[Filtra localOptions]
G([Enter pressionado]) --> H{localOptions\nvazio?}
H -- Sim --> I[localValue = vazio\nisTyping = false]
H -- Não --> J[localValue = primeira opção\nisTyping = false]
K([Clique em item]) --> L[selectItem\nlocalValue = item\nactive = false\nisTyping = false\nblur]
L --> M[hide via blur\nreset localOptions\nactive = false\nisTyping = false]
N([Blur no input]) --> O[hide\nverifica localValue\nreset estado]
Last reviewed commit: afdeadc
Contributor
ezequias21
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Por favor, verifique se o seu pull request está de acordo com o checklist abaixo:
1 - Resumo
Corrige erro no select quando a busca no mesmo não corresponde a nenhum item e o botão Enter é pressionado.
2 - Tipo de pull request
3 - Esse PR fecha alguma issue? Favor referenciá-la
Não.
4 - Quais são os passos para avaliar o pull request?
5 - Imagem ou exemplo de uso:
6 - Esse pull request adiciona breaking changes?