Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
This repository was 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

@jfeust

Description

@jfeust

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions