Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Chips: possible to combine autoselect with custom values? #3921

Closed
oharlem opened this issue Jul 28, 2015 · 9 comments
Closed

Chips: possible to combine autoselect with custom values? #3921

oharlem opened this issue Jul 28, 2015 · 9 comments
Assignees
Labels
needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue severity: inconvenient type: docs

Comments

@oharlem
Copy link

oharlem commented Jul 28, 2015

Hi,

Is it possible to combine chips auto-select with manual entry, like here: http://mbenford.github.io/ngTagsInput/demos ?

If not, please consider this to be a feature request.

Most frequent use-case: we want to let customers add their own tags, however would like them to see the pre-existing ones first to minimize number of variations (due to different spellings, misspellings, etc.).
Example workflow:

  • user entered some music styles from a list of predefined styles
  • now he/she wants to add a "punk" music style, however it does not exist in our db yet
    ( drop-down shows an existing style - "post-punk", as it matches the "punk" part )
  • user decides to keep his own - "punk" and clicks on Enter or (defocus, etc)
  • new chip appears in the input, in addition to the others, previously selected or loaded

Thank you!
D

@ThomasBurleson ThomasBurleson modified the milestone: REVISIT Jul 31, 2015
@ThomasBurleson ThomasBurleson added needs: review This PR is waiting on review from the team and removed needs: review This PR is waiting on review from the team labels Jul 31, 2015
@typotter typotter modified the milestones: Backlog, REVISIT Aug 10, 2015
@typotter typotter removed the needs: review This PR is waiting on review from the team label Aug 10, 2015
@typotter
Copy link
Contributor

remove md-require-match from md-chips, and you will be able to add items not already in the autocomplete list.
You will need to provide an md-on-append expression.

@typotter typotter added the needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue label Aug 10, 2015
@typotter typotter modified the milestones: 1.0-beta1, Backlog Aug 10, 2015
@typotter
Copy link
Contributor

reopening for docs.

@typotter typotter reopened this Aug 10, 2015
@oharlem
Copy link
Author

oharlem commented Aug 10, 2015

@typotter
I confirm that the issue has been resolved.
Thank you, Sir!

@typotter
Copy link
Contributor

Thanks @dopgm. Am keeping open the issue to add to the docs, as that attribute is not documented yet.

@naomiblack naomiblack modified the milestones: 1.0-beta1, post-1.0 Aug 14, 2015
@chr22
Copy link

chr22 commented Sep 18, 2015

When you add a Chip with the enter key (not the mouse), it will add two chips, the correct one, and one with the text you entered.
Here is a CodePen demo.

This is only without me-on-require-match.

@oharlem
Copy link
Author

oharlem commented Sep 18, 2015

@chr22
I've just checked the CodePen demo. Yeah, I see the concept working. Thank you!
The only issue is that custom chips do not display text, just brackets :/

@chr22
Copy link

chr22 commented Sep 18, 2015

@dopgm no if think you misunderstand me.

It adds two chips for one return-key hit.
I chose two different chips in the picture below, but it added four chips:
chip

@topherfangio
Copy link
Contributor

@chr22 See #4666 which points to two PRs that should alleviate this problem.

@typotter Mind if I close this in favor of #4666 which is specific to adding the docs?

@topherfangio
Copy link
Contributor

@chr22 Scratch my last comment; I think your issue is actually a duplicate of #4412.

Closing this due to duplicates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue severity: inconvenient type: docs
Projects
None yet
Development

No branches or pull requests

6 participants