Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

createTokenItem doesn't add the new item to the select option list (jquery) #261

Open
jfeust opened this issue Apr 9, 2019 · 0 comments

Comments

@jfeust
Copy link

jfeust commented Apr 9, 2019

Using selectivity-jquery 3.1.0.

$('.tags').selectivity({
    tokenSeparators: [','],
    createTokenItem: function (val) {
      return { id: val, text: val }
    }
  });

This adds new items to the selectivity div, but does not also add them to the <select class="tags"> <options> list. Thus when the form is submitted these "new values" are not submitted with it.

This does work in 2.1.0 from cdnjs but not with 3.1.0 jquery build.

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

No branches or pull requests

1 participant