question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Dynamic Value in type select or multiselect

See original GitHub issue

Thanks for such great plugin.

I have question how can i assign value in select or vue multiselect dynamic variable I mean Like this

type: "select",
        label: "countries",
        model: "countries",
		values : this.countries,
		options : this.countries

This way how can i use “countries” array to assign inside filed. If I am adding static array it works perfect.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
zoul0813commented, Dec 10, 2018

The solution to this is using a function for the values,

{
  type: "select",
  model: "country",
  values: () => {
    return this.countries;
  }
}

Sample Fiddle

0reactions
mvrck0commented, Sep 11, 2018

@goors Seems like you didn’t get an answer from @hotrush . Did you solve it or does the issue still exist?

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Use multiselect with dynamically generated select
Ajax calls are asynchronous. You call multiselect() before the ajax call has had time to complete and therefore the option list is still ......
Read more >
How do I dynamically populate a Multi-Select element?
STEP 1. From inside your form, add a Pick List element with a data column name of department. This element will be used...
Read more >
Using a Dynamic Multiselect Drop-Down List - IBI
Create a procedure that populates a drop-down list: Allocate a text file that will contain the dynamic values. For example, on Windows, the...
Read more >
dijit.form.MultiSelect — The Dojo Toolkit - Reference Guide
MultiSelect widgets always use a native SELECT tag and have child OPTION tags to describe selection choices, e.g. the OPTION's value attribute is...
Read more >
How to dynamically select items in a multiselect input
This is so that there is only one row in the results with all the values to be preselected. The done handler for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found