【问题标题】:Changing a Blueprint MultiSelect input placeholder text更改蓝图多选输入占位符文本
【发布时间】:2017-10-01 03:24:03
【问题描述】:

我正在寻找一种方法来替换“搜索...”默认输入字符串。查看MultiSelect component(和example page)的Blueprint Labs 文档,我找不到设置渲染输入占位符文本的方法。我曾假设它的工作方式类似于 Suggest 组件,但允许 inputProps 通过,但这似乎不起作用。这是我的示例代码:

<MultiSelect inputProps={{placeholder: "Search for a country"}} ...otherProps />

【问题讨论】:

    标签: javascript reactjs blueprintjs


    【解决方案1】:

    使用tagInputProps

    <MultiSelect
       tagInputProps={{ placeholder: 'Search for a country' }}
       itemRenderer={this.foo}
       tagRenderer={this.foo}
       items={[]}
       selectedItems={[]}
       onItemSelect={this.bar}
     />
    

    按预期工作

    【讨论】:

    • 这并没有提供问题的答案。要批评或要求作者澄清,请在他们的帖子下方留下评论。 - From Review
    • 感谢您的反馈,我扩大了答案
    • 顺便说一句:inputProps for Select & Suggest
    猜你喜欢
    • 1970-01-01
    • 2020-02-23
    • 1970-01-01
    • 2020-05-12
    • 1970-01-01
    • 2015-05-30
    • 2018-02-09
    • 1970-01-01
    • 2019-05-11
    相关资源
    最近更新 更多