【问题标题】:Going beyond the list of items (angular + primeng)超越项目列表(angular + primeng)
【发布时间】:2018-03-26 18:52:58
【问题描述】:

我对列表中的项目有疑问。

<p-listbox id="booking-users-list" [options]="items" [style]="{'width':'190px'}" [listStyle]="{'max-height':'238px'}">
    <ng-template let-participant let-i="index" pTemplate="item">
      <div>
          <div class="col-xs-10 col-sm-10 col-md-10 col-lg-10 task padd-users-list">
              <span>{{participant}}</span>
          </div>
          <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
              <button class="btn-x" class="btn-add-user" type="button" (click)="btnRemove(participant)">x</button>
          </div>
      </div>
    </ng-template>
  </p-listbox>

我想在列表太多时有滚动条效果。 有人可以帮忙吗?

【问题讨论】:

  • 您使用的是哪个版本的 prime-ng?

标签: html angular primeng


【解决方案1】:

您可以achieve that with css:将overflow: scroll 添加到 p-listbox 样式中。

您可能还需要最大化容器高度,max-height: XXX px; 也是如此。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-05-28
  • 2018-06-10
  • 1970-01-01
相关资源
最近更新 更多