Element: [Feature Request] Pass extra data on el-select remote-method

Created on 8 Aug 2017  ·  2Comments  ·  Source: ElemeFE/element

Existing Component

Yes

Component Name

el-select

Description

Hi,
Thanks for the great library.

From the existing el-select component, it would be better if we can pass other data to remote-method. This would be very helpful when using el-select on dynamic data.

for example,

<div v-for="(attr,index) in attrbutes">
    <el-select
        v-model="attr.id"
        multiple
        filterable
        remote
        placeholder="Please enter a keyword"
        :remote-method="remoteMethod($searckey,index)"
        :loading="loading">
            <el-option
                v-for="item in attr.items"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
    </el-select>
<div>

Once we search, It's really hard for us to know which el-select does the search.
In addition, I think it is the best way to manipulate data for which we want to use it.

Thanks :)

Most helpful comment

All 2 comments

Thanks :) I will try this.

Was this page helpful?
0 / 5 - 0 ratings