vue-treeselect icon indicating copy to clipboard operation
vue-treeselect copied to clipboard

回选问题

Open pengliangs opened this issue 6 years ago • 6 comments

image

在我进行默认选中时未找到对应的id就会出现unknown,请问是否有属性将其开启 置空或者修改提示语

pengliangs avatar Sep 19 '18 01:09 pengliangs

应该可以直接在value里删除不存在的那个值吧

ciloi avatar Oct 08 '18 09:10 ciloi

image

在我进行默认选中时未找到对应的id就会出现unknown,请问是否有属性将其开启 置空或者修改提示语

同样遇到这个问题,尚未解决

LiuKay avatar Oct 18 '18 07:10 LiuKay

image

在我进行默认选中时未找到对应的id就会出现unknown,请问是否有属性将其开启 置空或者修改提示语

我也遇到这个问题 请问有好的方法解决吗?

jason12138 avatar May 24 '19 08:05 jason12138

@riophae please help Is there anything planned to implement into the component?

RezaErfani67 avatar Apr 21 '20 18:04 RezaErfani67

As a workaround, I did this to fix this issue (extend your implementation to support arrays if you are using the multiple: true prop);

mounted() {
    /** Fix for selecting the default value on mount */
    if (this.value) {
      this.onFetch(this.value).finally(() => {
        const option = this.options.find(
          (option) => option.id === this.value
        )
        this.$refs['treeselect'].forest.nodeMap[this.value].label =
          option.label
      })
    }
  },
onFetch(search) {
  return axios.get(url, { data: { search }})
    .then(({ data }) => {
      this.options = data
     })
 },

Kind regards.

bangjelkoski avatar Jun 04 '20 11:06 bangjelkoski

solved here https://github.com/riophae/vue-treeselect/issues/172#issuecomment-842391127 .

iMilad95 avatar May 17 '21 14:05 iMilad95