Base solution for your next web application
Open Closed

p-autocomplete in [hidden] #7814


User avatar
0
sophoana created

Hi support

Cannot show p-autocomplete in [hidden].

I'm use: -angular 7 -asp.net core

.html file <div class="row mb-4" [hidden]="!CustomerSettingAreShown"> <div class="form-group col-md-6"> <label for="CustomerSaleCode">{{"CustomerSaleCode" | localize}}</label>
<p-autoComplete id="SingleSelectSaleCodeInput" name="SingleSelectSaleCodeInput" field="name" [(ngModel)]="chartOfAccountSaleCode" [suggestions]="filteredChartOfAccountSaleCode" (completeMethod)="filterChartOfAccountSaleCode($event)" (onSelect)="onSelectedChartOfAccountsSaleCode($event)" [minLength]="1" inputStyleClass="form-control" styleClass="width-percent-100"> <ng-template let-chartOfAccount pTemplate="item"> {{chartOfAccount.name}} </ng-template> </p-autoComplete> </div> </div>


2 Answer(s)
  • User Avatar
    0
    sophoana created

    html file: <label><span class="colour" style="color:rgb(128, 128, 128)"><</span><span class="colour" style="color:rgb(86, 156, 214)">div</span><span class="colour" style="color:rgb(212, 212, 212)"> </span><span class="colour" style="color:rgb(156, 220, 254)">class</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"row mb-4"</span><span class="colour" style="color:rgb(212, 212, 212)"> </span><span class="colour" style="color:rgb(156, 220, 254)">[hidden]</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"!CustomerSettingAreShown"</span><span class="colour" style="color:rgb(128, 128, 128)">></span></label><span class="colour" style="color:rgb(212, 212, 212)">                        </span><span class="colour" style="color:rgb(128, 128, 128)"><</span><span class="colour" style="color:rgb(86, 156, 214)">div</span><span class="colour" style="color:rgb(212, 212, 212)"> </span><span class="colour" style="color:rgb(156, 220, 254)">class</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"form-group col-md-6"</span><span class="colour" style="color:rgb(128, 128, 128)">></span> <span class="colour" style="color:rgb(212, 212, 212)">                            </span><span class="colour" style="color:rgb(128, 128, 128)"><</span><span class="colour" style="color:rgb(86, 156, 214)">label</span><span class="colour" style="color:rgb(212, 212, 212)"> </span><span class="colour" style="color:rgb(156, 220, 254)">for</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"CustomerSaleCode"</span><span class="colour" style="color:rgb(128, 128, 128)">></span><span class="colour" style="color:rgb(212, 212, 212)">{{"CustomerSaleCode" | localize}}</span><span class="colour" style="color:rgb(128, 128, 128)"></</span><span class="colour" style="color:rgb(86, 156, 214)">label</span><span class="colour" style="color:rgb(128, 128, 128)">></span><span class="colour" style="color:rgb(212, 212, 212)">                            </span>

    <span class="colour" style="color:rgb(212, 212, 212)">                            </span><span class="colour" style="color:rgb(128, 128, 128)"><</span><span class="colour" style="color:rgb(86, 156, 214)">p-autoComplete</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">id</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"SingleSelectSaleCodeInput"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">name</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"SingleSelectSaleCodeInput"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">field</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"name"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">[(ngModel)]</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"chartOfAccountSaleCode"</span><span class="colour" style="color:rgb(212, 212, 212)"> </span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">[suggestions]</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"filteredChartOfAccountSaleCode"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">(completeMethod)</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"filterChartOfAccountSaleCode($event)"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">(onSelect)</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"onSelectedChartOfAccountsSaleCode($event)"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">[minLength]</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"1"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">inputStyleClass</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"form-control"</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(156, 220, 254)">styleClass</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"width-percent-100"</span><span class="colour" style="color:rgb(128, 128, 128)">></span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(128, 128, 128)"><</span><span class="colour" style="color:rgb(86, 156, 214)">ng-template</span><span class="colour" style="color:rgb(212, 212, 212)"> </span><span class="colour" style="color:rgb(156, 220, 254)">let-chartOfAccount</span><span class="colour" style="color:rgb(212, 212, 212)"> </span><span class="colour" style="color:rgb(156, 220, 254)">pTemplate</span><span class="colour" style="color:rgb(212, 212, 212)">=</span><span class="colour" style="color:rgb(206, 145, 120)">"item"</span><span class="colour" style="color:rgb(128, 128, 128)">></span> <span class="colour" style="color:rgb(212, 212, 212)">                                    {{chartOfAccount.name}}</span> <span class="colour" style="color:rgb(212, 212, 212)">                                </span><span class="colour" style="color:rgb(128, 128, 128)"></</span><span class="colour" style="color:rgb(86, 156, 214)">ng-template</span><span class="colour" style="color:rgb(128, 128, 128)">></span> <span class="colour" style="color:rgb(212, 212, 212)">                            </span><span class="colour" style="color:rgb(128, 128, 128)"></</span><span class="colour" style="color:rgb(86, 156, 214)">p-autoComplete</span><span class="colour" style="color:rgb(128, 128, 128)">></span> <span class="colour" style="color:rgb(212, 212, 212)">                        </span><span class="colour" style="color:rgb(128, 128, 128)"></</span><span class="colour" style="color:rgb(86, 156, 214)">div</span><span class="colour" style="color:rgb(128, 128, 128)">></span> <span class="colour" style="color:rgb(128, 128, 128)"></span><span class="colour" style="color:rgb(212, 212, 212)"> </span><span class="colour" style="color:rgb(128, 128, 128)"></</span><span class="colour" style="color:rgb(86, 156, 214)">div</span><span class="colour" style="color:rgb(128, 128, 128)">></span>

  • User Avatar
    0
    musa.demir created

    duplicate of Questions/7812