element [Feature Request] Allow Remote-Method to pass additional arguments

dfddblmv  于 2022-11-13  发布在  其他
关注(0)|答案(2)|浏览(105)

Existing Component

Yes

Component Name

Select

Description

Currently, Remote-method only passes the current value of the input.
I have a component that dynamically creates multiple selects tied to different datasets.
In order for the remote-method to correctly know which dataset it relates to I need to pass an additional argument to the remote-method function.
Can this be added or is there an alternate way of achieving this?

klr1opcd

klr1opcd1#

@tobybowers
I also stacked with this problem. You can do a little trick

<template>
<el-select
 filterable
 remote
 :remote-method="(e) => MySuperSearchFunction(e, myArgument)"
>
</el-select>
</template>
methods: {
 MySuperSearchFunction(query, myArgument) {
 //do stuff
 }
}
bz4sfanl

bz4sfanl2#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题