Giter Site home page Giter Site logo

Comments (4)

juujisai avatar juujisai commented on May 23, 2024

Hello! Thanks for letting us know about this issue! I'm adding this issue to our project.

BTW If you are making calls to the API, maybe the autocomplete component would fit your needs there? We have an example with asynchronous search that can be found here:

https://tw-elements.com/docs/standard/forms/autocomplete/#asynchronous-search

Best Regards!

from tailwind-elements.

andremartinez avatar andremartinez commented on May 23, 2024

I was going to open this exact same issue, but for Angular.

Pretty much the same behavior, but also happens with NgModel (or pretty much any data binding)

Filtering and selecting after typing something sets the date for my model, but after that, it's stuck forever

I'll try the autocomplete suggestion tho, might be a good workaround

<select data-te-select-init
        data-te-select-size="lg"
        data-te-select-filter="true"
        data-te-select-no-result-text="Não encontrado"
        data-te-select-search-placeholder="buscar..."
        data-te-select-clear-button="true"
        [(ngModel)]="selectedUF"
        (ngModelChange)="onSelectedUFChange($event)"
        [disabled]="ufs.length < 2  || disabled"
        id="selectUnidadeFederativa">
    <option value=""></option>
    <option *ngFor="let item of ufs; index as i;" value="{{item.UF}}">{{item.UF}}</option>
</select>
<label data-te-select-label-ref class="z-10" [ngClass]="{'required' : isRequired === true}">UF</label>

from tailwind-elements.

AndoruKun avatar AndoruKun commented on May 23, 2024

I was going to open this exact same issue, but for Angular.

Pretty much the same behavior, but also happens with NgModel (or pretty much any data binding)

Filtering and selecting after typing something sets the date for my model, but after that, it's stuck forever

I'll try the autocomplete suggestion tho, might be a good workaround

<select data-te-select-init
        data-te-select-size="lg"
        data-te-select-filter="true"
        data-te-select-no-result-text="Não encontrado"
        data-te-select-search-placeholder="buscar..."
        data-te-select-clear-button="true"
        [(ngModel)]="selectedUF"
        (ngModelChange)="onSelectedUFChange($event)"
        [disabled]="ufs.length < 2  || disabled"
        id="selectUnidadeFederativa">
    <option value=""></option>
    <option *ngFor="let item of ufs; index as i;" value="{{item.UF}}">{{item.UF}}</option>
</select>
<label data-te-select-label-ref class="z-10" [ngClass]="{'required' : isRequired === true}">UF</label>

yeah that true after you doing filter and select the value it will be stuck forever because this TW-element core basic on native they don't detect to framework just like angular or nuxt and anything so my options better use value then maybe it will work. so if you got like me after setValue best temp resolve its just dispose and init again it will be fixing
@andremartinez

from tailwind-elements.

andremartinez avatar andremartinez commented on May 23, 2024

yeah that true after you doing filter and select the value it will be stuck forever because this TW-element core basic on native they don't detect to framework just like angular or nuxt and anything so my options better use value then maybe it will work. so if you got like me after setValue best temp resolve its just dispose and init again it will be fixing

Thanks for the suggestion @AndoruKun , because of some deadlines I had to simply remove tw-elements from the selects and implement other solutions.

I'll probably test this again once v2.0,0 is out.

from tailwind-elements.

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.