-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
feature requestNew feature or requestNew feature or request
Description
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 called auto-pending
which defaults to true to maintain backward compatibility:
autoPending: {
type: Boolean,
default: true
}
Then we can pass this prop to the internal select menu component:
<NInternalSelectMenu
// other props
autoPending={this.autoPending}
// other props
/>
This allows users to disable the automatic pre-selection of the first option by setting auto-pending="false" on the component:
<n-auto-complete
v-model:value="value"
:options="options"
:auto-pending="false"
/>
Alternative
No response
Additional context
No response
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request