valor-software / ng2-select

Angular based replacement for select boxes
http://valor-software.github.io/ng2-select/
MIT License
675 stars 587 forks source link

iPad problem close issue #948

Open MarcoSantino opened 6 years ago

MarcoSantino commented 6 years ago

Hi all,

i had a problem with ng2-select on iPad. When I click out the dropdown don't close.

This is code:

component.html

<ng-select [allowClear]="false" [items]="orderBy" (data)="refreshValueOrder($event)" 
    (selected)="selectOrder($event)" placeholder="{{placeholderOrder}}">
</ng-select>

component.ts

    public refreshValueOrder(value: any): void {
        this.valueOrder = value;
    }
    public selectOrder(value: any): void {
        let type = 0;
        switch (value.id) {
            case '0':
                this.ascending = true;
                this.variableOrder = 'provincia';
                break;
            case '1':
                this.ascending = false;
                this.variableOrder = 'provincia';
                type = 1;
                break;
            case '2':
                this.ascending = true;
                this.variableOrder = 'percentuale';
                type = 2;
                break;
            case '3':
                this.ascending = false;
                this.variableOrder = 'percentuale';
                type = 3;
                break;
        }

        this.placeholderOrder = value.text;
    }

Anyone can help me?

optimistex commented 6 years ago

@MarcoSantino the package seems does not have any maintenance. I continuing to developing the project in my fork: https://github.com/optimistex/ngx-select-ex Try it! I think there is solved your issue. But if not then let me know and we'll try to solve it.