You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Result:
In the select list option I get the whole objects including their fields
Expected:
In the select list options I have only text values according to the label prop I have set.
In this case, only name should be shown (Vue.js, Rails, Sinatra) just the same as in the official vue multi select docs. http://monterail.github.io/vue-multiselect/#sub-single-select-object
Cause:
It seems that customLabel function from the fieldMultiSelect has some wrong logic in it:
This bit return function(currentLabel){return currentLabel;}; returns the whole object instead of returning the necessary label only. Also a specified customLabel function doesn't work because of this check this.schema.selectOptions.customLabel === "function" which has a missing typeof before it.
Here is an alternative:
Since the vue-multiselect library has it's own way of handling default values why not pass an undefined to it when there is no customLabel provided by the user and let the library handle it's stuff?
The text was updated successfully, but these errors were encountered:
Version: vue-form-generator 2.0.0-beta.15
Scenario:
Copy pasted the example from https://icebob.gitbooks.io/vueformgenerator/content/fields/vuemultiselect.html (simple object select)
Result:

In the select list option I get the whole objects including their fields
Expected:
In the select list options I have only text values according to the
label
prop I have set.In this case, only
name
should be shown (Vue.js, Rails, Sinatra) just the same as in the official vue multi select docs. http://monterail.github.io/vue-multiselect/#sub-single-select-objectCause:
It seems that
customLabel
function from the fieldMultiSelect has some wrong logic in it:This bit
return function(currentLabel){return currentLabel;};
returns the whole object instead of returning the necessary label only. Also a specifiedcustomLabel
function doesn't work because of this checkthis.schema.selectOptions.customLabel === "function"
which has a missingtypeof
before it.Here is an alternative:
Since the vue-multiselect library has it's own way of handling default values why not pass an
undefined
to it when there is nocustomLabel
provided by the user and let the library handle it's stuff?The text was updated successfully, but these errors were encountered: