Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two or more multiselect fields with "select all" button #411

Open
bonomi2003 opened this issue Mar 23, 2023 · 0 comments
Open

Two or more multiselect fields with "select all" button #411

bonomi2003 opened this issue Mar 23, 2023 · 0 comments

Comments

@bonomi2003
Copy link

bonomi2003 commented Mar 23, 2023

First of all, I would like to thank the programmers of the project. He is very good.

I have a project that I need to use 2 or more "ionic-selectable" on the same page and both have to have the "select all" button. These fields are created dynamically.

the usage examples have a selector to identify the fields like:

@ViewChild('portComponent') **portComponent**: IonicSelectableComponent;

<ionic-selectable **#portComponent >** </ionic-selectable>

as the fields are generated dynamically, I can't create the selector dynamically. Today only the first field works, the others are giving error.

My field today has the following code:

`<ionic-selectable
#portComponent
[(ngModel)]="questionBloco.opcaoSelecionadaArray"
itemValueField="id"
itemTextField="descricao"
closeButtonText="X"
searchPlaceholder="Pesquisar"
[searchFailText]="'Nenhum registro encontrado!'"
[items]="questionBloco.opcoes | sort : 'descricao'"
[canSearch]="true"
[isMultiple]="true"
name="question-{{questionBloco.id}}-{{blocos.sequencia}}"
[hasVirtualScroll]="true"

`

as you can see the name field is generated dynamically, but I can't do the same with the #portComponent selector.

Is there any way to solve this problem?

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

No branches or pull requests

1 participant