add option to disable pre-selects of first dropdown item in n-auto-complete
#6797
Labels
feature request
New feature or request
n-auto-complete
#6797
Clear and concise description of the problem
Currently, the
n-auto-complete
always pre-selects the first option in the dropdown list, which means pressing Enter will automatically select this option.While this behavior is useful in many cases, there are scenarios where developers might want to disable this auto-pending behavior to give users more explicit control over their selections.
Suggested solution
In the
n-auto-complete
component, we can add a new boolean prop calledauto-pending
which defaults to true to maintain backward compatibility:Then we can pass this prop to the internal select menu component:
This allows users to disable the automatic pre-selection of the first option by setting auto-pending="false" on the component:
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: