This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
How to pass selected option in JSON data? #57
Comments
Hi the data source is only used when searching value, if you have to display selected option on load, just put "selected" attribute to options. Have a look to this issue #9 |
But I do not have option. I am using Json for data source.
…On Thu, 4 Oct 2018, 1:05 pm David Zeller, ***@***.***> wrote:
Hi the data source is only used when searching value, if you have to
display selected option on load, just put "selected" attribute to options.
Have a look to this issue #9
<#9>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH4kJHbznjRVn64MJiWxGIXW6yI_t6mSks5uhbpBgaJpZM4XFs4u>
.
|
You have to fetch your json on load manually and for each item, use this method $('.tokenize-demo').tokenize2().trigger('tokenize:tokens:add', ['token value', 'token display text', true]); |
Hi David,
Okay, that seems good.
But I am facing one more issue there. The issue is on mobile devices.
When the user clicks on the drop-down. And wanted to not select any
category and want to close the dropdown so he cannot close it. Until he
select any category, he cannot close that dropdown.
…On Thu, Oct 4, 2018 at 2:08 PM David Zeller ***@***.***> wrote:
You have to fetch your json on load manually and for each item, use this
method
$('.tokenize-demo').tokenize2().trigger('tokenize:tokens:add', ['token value', 'token display text', true]);
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH4kJN1Uct8UQkkWaDc-E3NckqQSYd6Zks5uhcj7gaJpZM4XFs4u>
.
|
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there,
I am using the tokenize2 plugin for multiselection and autocomplete. And it is a perfect plugin.
But I am facing an issue with that, I don't know how to pass selected option attribute with JSON data source. So that when user load page he may see some options already selected.
Just FYI, I am using data source as URL, not select type.
Many thanks in advance.
Sunny
The text was updated successfully, but these errors were encountered: