【问题标题】:PrimeNg (7.x) / P-TREE / Filter / Double scroll barPrimeNg (7.x) / P-TREE / Filter / 双滚动条
【发布时间】:2021-02-03 08:35:35
【问题描述】:

当我在 PrimeNg (7.x) p-tree 上添加过滤器属性时,它按预期工作,但我有一个双滚动条。

实现并不特殊

            <div class="row" *ngIf="formControls.wantThemes.value">
                <div class="col-4 app-notif-edit-label"></div>
                <div class="col-4 app-notif-edit-content">
                    <h4>Themes</h4>
                    <p-tree
                        [filter]="true"
                        class="app-notif-p-tree"
                        [value]="cmtyThemesTreeNodes"
                        [(selection)]="selectedCmtyThemesTreeNodes"
                        selectionMode="checkbox"
                        (onNodeSelect)="nodeSelectThemes($event)"
                        (onNodeUnselect)="nodeSelectThemes($event)"
                    >
                    </p-tree>
                </div>
            </div>

我已应用以下 css 来限制框的大小

.app-notif-p-tree .ui-tree {
color: $sinapseBlue;
display: block;
font-size: medium;
height: 100%;
margin: 2% auto;
max-height: 250px;
min-height: 250px;
overflow: auto;
white-space: nowrap;
width: 97%; }

如果我将溢出更改为隐藏,我看不到列表的最后一个元素。

知道为什么吗?谢谢

【问题讨论】:

  • 更新:我已经添加了.app-notif-p-tree .ui-tree .ui-tree-container { height: 80%; } 但也许还有另一种方法

标签: primeng primeng-tree


【解决方案1】:

我添加了 .app-notif-p-tree .ui-tree .ui-tree-container { height: 80%; }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-05
    • 1970-01-01
    • 2019-05-15
    • 1970-01-01
    • 1970-01-01
    • 2022-01-17
    • 1970-01-01
    相关资源
    最近更新 更多