Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

409
Views
PrimeNg multiselect inside a modal don't close on clicking outside of the multiselect box
    <modal #myModal>
        <modal-header>
            <h1>Material Picker</h1>
        </modal-header>
        <modal-content>
            Brand:
            <p-dropdown [(ngModel)]="selectedBrand"
                        [options]="brands"
                        id="brand"
                        placeholder="Select a brand"
            ></p-dropdown>
            <br>
            Product Type:
            <p-multiSelect
                [(ngModel)]="selectedProductType"
                [options]="productTypes"
                defaultLabel="Select a product type"
                id="productType"
                [maxSelectedLabels]="0"
                selectedItemsLabel="{0} product(s) selected"
            ></p-multiSelect>
        </modal-content>
        <modal-footer>
            <button (click)="closeModal()" class="btn btn-primary">close</button>
        </modal-footer>
    </modal>

If I open this p-multiselect or p-dropdown then click outside it doesn't close. What should I do to make this multiselect or dropdown close on clicking outside of the component?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!