Search code examples
javascriptreactjsblueprintjs

Changing a Blueprint MultiSelect input placeholder text


I am looking for a way to replace the "Search..." default input string. Looking through the Blueprint Labs docs for the MultiSelect component (and example page) I am unable to find a way to set the rendered input's placeholder text. I had assumed it would work similar to the Suggest component but allowing for an inputProps pass thru, but that doesn't seem to work. Here's my sample code:

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

Solution

  • Use tagInputProps.

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

    Works as expected

    enter image description here