0

Currently using Element Plus' el-select component. When filtering for a non-existent option, remote-method triggers fine and returns the expected result (empty since option is non-existent).
Since there's nothing to select, user clicks anywhere outside the pulldown and it closes.
When clicking the pulldown again, the previous filter query remains (remote-method does not trigger again to reinit the whole options list)
and I have no way to show the original complete list of options

  1. How to trigger el-select's remote-method again after filtering a non-existing option
  2. Is it possible that this is an Element Plus bug?

Here are the attributes:

allow-create
default-first-option
filterable
multiple
reserve-keyword
:remote="true"
:remote-method="filterOptions"

I've made a simple demo to illustrate the issue:
https://jsfiddle.net/nathanielisaacyu/g1trex49/17/

Steps:

  1. Type "aaa" in the pulldown
  2. Pulldown only shows "Own" since that is a static option
  3. Click anywhere outside to close pulldown
  4. Click on the pulldown field
  5. Options only show "Own" and not "One", "Two", "Three"

1 Answers1

0

add @blur="filterOptions('')" to the el-select tag, it will make sure to do a clean search every time you click the select.

Jay Li
  • 737
  • 1
  • 7
  • 17