Giter Club home page Giter Club logo

Comments (7)

igordeoliveirasa avatar igordeoliveirasa commented on May 30, 2024

Do you have any trick so as to do right now in order to release to my customer? Or, do you know when could you guys solve it? Thanks!

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

Hi @igordeoliveirasa, thanks for the congratulations!

Unfortunately right now there is no option for doing that.

Most likely there will be no option for doing it in the future, but I may add an output for when a key is pressed in the input, so that you could transform the value of the value entered. Example:

  • transform all keys entered to uppercase
  • enter items in uppercase

so that they will match

from ngx-chips.

igordeoliveirasa avatar igordeoliveirasa commented on May 30, 2024

I'm anxious for that!! Thanks!

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

Hi @igordeoliveirasa,

I published the version 0.2.2 and now case it is case insensitive :)

from ngx-chips.

simoazzo avatar simoazzo commented on May 30, 2024

Hi Gbuomprisco,

I have updated to the latest version and case is still sensitive:

<tag-input [(ngModel)]="_job.JobClients"
[autocompleteItems]="_clientsNames"
[onlyFromAutocomplete]="true"
placeholder="Client"
secondaryPlaceholder = "Choose Client"
[autocomplete]="true" ngControl="jobClients" name="jobClients" #jobClients="ngForm">

How can Enable it please?

from ngx-chips.

reachnana avatar reachnana commented on May 30, 2024

Is there an update on this? The latest version is still case sensitive.

from ngx-chips.

jlamarr22 avatar jlamarr22 commented on May 30, 2024

@Gbuomprisco is right in that the tag-input component is case sensitive, but it doesn't check the autocomplete for case sensitivity when someone is typing a value into the input.

You can do this yourself in a somewhat roundabout way. You have to use the [onAdding] hook and check for case sensitivity there. If your user enters "abc" and you have an item in your auto complete for "ABC", then you'd return the item from your auto complete. Here's an example:

<tag-input
    [onAdding]="checkTagReference()"
    ...
  >
    <tag-input-dropdown
      [autocompleteItems]="values"
      [displayBy]="'itemValue'"
      [identifyBy]="'itemValue'"
      ...
    >
      <ng-template let-item="item">
        {{ item.itemValue }}
      </ng-template>
    </tag-input-dropdown>
  </tag-input>
  // Necessary to retain the reference to 'this'
  checkTagReference() {
    let comp = this;
    return function(itemValue: string) {
      return comp.checkTag(itemValue);
    };
  }

  checkTag(itemValue: string): Observable<string> {
    let comp = this;
    return of(comp.getAutocompleteItemIfExists(itemValue));
  }

  // '_' is lodash: https://lodash.com/docs/4.17.11
  getAutocompleteItemIfExists(itemValue: string): string {
    let comp = this;
    let currentItem = _.find(comp.values, function(value: SomeType) {
      return value.itemValue.toLowerCase() === itemValue.toLowerCase();
    });

    return currentItem ? currentItem.itemValue : itemValue;
  }

from ngx-chips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.