ElemeFE / ElemeFE/element

[Feature Request] Parameter of change event emitted by cascader is not consistent with the description

Open
#20,170 1 comment 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component
Yes

### Component Name
Cascader

### Description
Accroding to the documentation, we could get the value of the node we select in a cascader when we set `emitPath` as `false` in `props`.
![image](https://user-images.githubusercontent.com/33533508/93033097-52d55b00-f667-11ea-8b47-9de4b87a9cab.png)
If I alse set `multiple` as `true` like this,
```js

```
We expected to get the latest selected value, but we got a array of all selected values instead.
![image](https://user-images.githubusercontent.com/33533508/93033450-e8251f00-f668-11ea-8f7b-1f23686f7e04.png)

Although we all know that is consistent with the design priciple of `@change` event, we have no any other ways to get the latest selected value in such a situation, setting `multiple` as `true` as well as `emitPath` as `false`.

If there were any approach we missed, please tell us. If no, we hope that could be a new feature in next update.

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.