Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/471.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何增加mat autocomplete的长度并获得水平滚动_Javascript_Html_Css_Angular - Fatal编程技术网

Javascript 如何增加mat autocomplete的长度并获得水平滚动

Javascript 如何增加mat autocomplete的长度并获得水平滚动,javascript,html,css,angular,Javascript,Html,Css,Angular,我跑得有角度,准确地说是有角度。我想增加自动完成长度,这样我就可以显示许多客户,我还想水平滚动,因为客户名称只显示一半 如何实现这一点,我确实看了mat autocomplete文档,但我不太了解。非常感谢您的帮助 template.html <mat-form-field [style.cursor]="pointer" [style.cursor]="pointer" [style.width.px]=300 > <input class="selectCus

我跑得有角度,准确地说是有角度。我想增加自动完成长度,这样我就可以显示许多客户,我还想水平滚动,因为客户名称只显示一半

如何实现这一点,我确实看了mat autocomplete文档,但我不太了解。非常感谢您的帮助

template.html

<mat-form-field [style.cursor]="pointer" [style.cursor]="pointer" [style.width.px]=300  >
     <input class="selectCustomer" class="selectCustomerData" id="inputCustomer" matInput [matAutocomplete]="auto"  [formControl]="customerFilterControl" [(ngModel)]="customerName">
     <mat-icon matSuffix>keyboard_arrow_down</mat-icon>
       <p id="spandiv">{{customerName}}</p>  
     <mat-autocomplete dropdown-arrow="true" panelWidth ="450px" #auto="matAutocomplete" [displayWith] = "displayFn">
        <mat-option class="CustomerDropDown" *ngFor="let customer of filteredOptions | async"   [value] ="customer.AccountID +' '+'('+ customer.AccountName + ')'" (onSelectionChange)="onCustomerChange(customer)">
         {{customer.AccountID}} ({{customer.AccountName}})
        </mat-option>
    </mat-autocomplete>
  </mat-form-field>

上述努力没有给我带来任何结果。

这是否回答了您的问题?这回答了你的问题吗?
::ng-deep .cdk-overlay-pane {

     height:450px;
}