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

Format input like result list #43

Open
achimha opened this issue Aug 25, 2017 · 1 comment
Open

Format input like result list #43

achimha opened this issue Aug 25, 2017 · 1 comment

Comments

@achimha
Copy link

achimha commented Aug 25, 2017

There is support to style the result list using *iq-select2-template but I wonder how the same formatting can be applied to the input once an item is selected?

@achimha
Copy link
Author

achimha commented Aug 25, 2017

The template of the component displays the selected results like this:

 <li *ngFor="let item of selectedItems" class="select2-selected" [class.label]="multiple"
            [class.label-info]="multiple">
            <span class="selectedItemText">{{item.text}}</span>
            <a class="select2-selection-remove" (click)="removeItem(item)" *ngIf="!disabled">
                <i [class]="deleteIcon" [class.text-info]="!multiple"></i>
            </a>
        </li>

It would need a mechanism using ng-container and ngTemplateOutlet for the selected result as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants