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

Seeing (Unknown) when no option is selected

Open rajeshgadepalli opened this issue 5 years ago • 5 comments

Here is the markup of my component

        <treeselect
          v-model="value"
          :multiple="false"
          :options="options"
          :defaultExpandLevel="Infinity"
          :alwaysOpen="false"
          placeholder="Select Practice area"
        />

I find an (Unknown) when none of the options is selected.

The version of the component I am using is "@riophae/vue-treeselect": "^0.4.0"

Capture

rajeshgadepalli avatar Dec 01 '19 04:12 rajeshgadepalli

The issue is between empty and null

get () { return this.value === '' ? null: this.value; },

Fixes for me - when I try to set to empty, I send null to treeselect

alexbainbridge avatar Dec 17 '19 15:12 alexbainbridge

The issue is between empty and null

get () { return this.value === '' ? null: this.value; },

Fixes for me - when I try to set to empty, I send null to treeselect

It works! Thank you!

rajeshgadepalli avatar Dec 24 '19 10:12 rajeshgadepalli

The issue is between empty and null

get () { return this.value === '' ? null: this.value; },

Fixes for me - when I try to set to empty, I send null to treeselect

The issue is between empty and null get () { return this.value === '' ? null: this.value; }, Fixes for me - when I try to set to empty, I send null to treeselect

It works! Thank you!

Sir can you kindly tell where should "get () { return this.value === '' ? null: this.value; }" be?

DDorj avatar Mar 05 '21 06:03 DDorj

The issue is between empty and null

get () { return this.value === '' ? null: this.value; },

Fixes for me - when I try to set to empty, I send null to treeselect

Sir can you kindly tell where should "get () { return this.value === '' ? null: this.value; }" be?

DDorj avatar Mar 05 '21 06:03 DDorj

@DDorj

See getter and setter: https://vuejs.org/v2/guide/computed.html#Computed-Setter

get () {} is the same as get: function () {}.

TitanFighter avatar Mar 16 '21 13:03 TitanFighter