【问题标题】:Blueprint.js MultiSelect: how to enable scrolling?Blueprint.js MultiSelect:如何启用滚动?
【发布时间】:2020-07-01 21:28:46
【问题描述】:

在 Blueprint.js MultiSelect 示例 https://blueprintjs.com/docs/#select/multi-select 中,单击搜索框后,正好显示 10 个项目。我们可以向下滚动查看其余部分。

如何启用滚动和/或指定显示的最大项目数?

【问题讨论】:

    标签: blueprint


    【解决方案1】:

    MultiSelect标签中,添加popoverProps道具,然后在popoverClassName中填写自定义css值:

    .custom-class {
        max-height: 150px;
        overflow-y: auto;
    }
    
    <MultiSelect
        popoverProps={{
        popoverClassName: "custom-class",
      }}
    />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-07
      • 1970-01-01
      • 2020-06-07
      • 1970-01-01
      相关资源
      最近更新 更多