ElemeFE / ElemeFE/element

[Feature Request] trim inputValue easily when cascader is `filterable`

Open
#21,594 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component

### Component Name
Cascader

### Description
Is there an easy way to trim the inputValue of a cascader when it is `filterable`? I know I can trim the keyword in a customized `filter-method` . But, all I want is just to trim the inputValue.

I have some ideas on making trim inputValue more easily:
1. Add a `trimInput` property in `props`
2. Use `before-filter` hook. If `before-filter` hook return a string or a Promise that resolve a string, then cascader will use this string to filter the options.

If you think this is an good idea, I can make some contributions.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.