Skip to content

Conversation

@Gregoor
Copy link
Contributor

@Gregoor Gregoor commented Mar 22, 2015

I required this feature which is afaik also present in Selectize. Let me know if I missed anything or you want to merge it and also need documentatoin.

Also tried to stick to your coding style and lint went through fine.

@JedWatson
Copy link
Owner

Thanks @Gregoor. I'd like to have a think on the implementation of this, as it would be good to also allow a callback for creating a new option (e.g. if a tag is required in the database to accept an ID - useful for SPAs). Will get back to you soon.

@AlexMeah
Copy link

👍 Need this for group selection/creation

@guzart
Copy link

guzart commented Apr 22, 2015

What are your thoughts so far @JedWatson ?

Am thinking probably a createOption property that takes a function which returns the option to be added. The function could have the following signature function(value:string, [callback:func]):object.

By default the added option would be { value: _optionsFilterString, label: _optionsFilterString}. If a createOption function is specified it could work synchronously by returning the option to be added, or asynchronously if a callback function is specified as the second parameter (arity of 2)

@barsukov
Copy link

+1

@dehbmarques
Copy link

+1

@dcousens
Copy link
Collaborator

Closing, this was added in #151

@dcousens dcousens closed this May 18, 2015
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

Successfully merging this pull request may close these issues.

7 participants