Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use dynamic html content within the dialog message? #33

Closed
adam-jones-net opened this issue Jul 11, 2018 · 1 comment
Closed

Comments

@adam-jones-net
Copy link

I'd love to be able to use this plugin to handle a couple of drop down boxes that are being populated by ajax and where the second drop down box refreshes each time a change is made to the first one.

To start testing this idea I made the following sample inspired by code from the vue documentation here which generates a select list and then should dynamically update a label next to it each time the select value changes.

let options = {
	html: true,
	reverse: true,
	okText: 'Submit',
	cancelText: 'Cancel',
	animation: 'zoom',
	backdropClose: true 
};
this.$dialog.confirm('<select v-model="selected"> <option disabled value="">Please select one</option> <option>A</option> <option>B</option><option>C</option></select><span>Selected: {{ selected }}</span>',options).then(function () {
	console.log('Clicked on submit')
})

When my dialog opens the select box is present but the dynamic text never updates, it just reports

Selected: {{ selected }}

Is what I'm trying to achieve possible via vue tags such as {{}} and its just that I've not implemented correctly or is this going to be a real mess and outside of the purpose of the plugin ?

@Godofbrowser
Copy link
Owner

Please use custom component for custom functionalities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants