Skip to content

Commit

Permalink
Fixed #2389 - Change default value of maxSelectedLabels property on M…
Browse files Browse the repository at this point in the history
…ultiSelect
  • Loading branch information
mertsincan committed Nov 4, 2021
1 parent 33d03c3 commit 13abd8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/showcase/multiselect/MultiSelectDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class MultiSelectDemo extends Component {
<div className="content-section implementation multiselect-demo">
<div className="card">
<h5>Basic</h5>
<MultiSelect value={this.state.selectedCities1} options={this.cities} onChange={(e) => this.setState({ selectedCities1: e.value })} optionLabel="name" placeholder="Select a City" />
<MultiSelect value={this.state.selectedCities1} options={this.cities} onChange={(e) => this.setState({ selectedCities1: e.value })} optionLabel="name" placeholder="Select a City" maxSelectedLabels={3} />

<h5>Chips</h5>
<MultiSelect value={this.state.selectedCities2} options={this.cities} onChange={(e) => this.setState({ selectedCities2: e.value })} optionLabel="name" placeholder="Select a City" display="chip" />
Expand Down
10 changes: 5 additions & 5 deletions src/showcase/multiselect/MultiSelectDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class MultiSelectDemo extends Component {
<div className="multiselect-demo">
<div className="card">
<h5>Basic</h5>
<MultiSelect value={this.state.selectedCities1} options={this.cities} onChange={(e) => this.setState({ selectedCities1: e.value })} optionLabel="name" placeholder="Select a City" />
<MultiSelect value={this.state.selectedCities1} options={this.cities} onChange={(e) => this.setState({ selectedCities1: e.value })} optionLabel="name" placeholder="Select a City" maxSelectedLabels={3} />
<h5>Chips</h5>
<MultiSelect value={this.state.selectedCities2} options={this.cities} onChange={(e) => this.setState({ selectedCities2: e.value })} optionLabel="name" placeholder="Select a City" display="chip" />
Expand Down Expand Up @@ -345,7 +345,7 @@ const MultiSelectDemo = () => {
<div className="multiselect-demo">
<div className="card">
<h5>Basic</h5>
<MultiSelect value={selectedCities1} options={cities} onChange={(e) => setSelectedCities1(e.value)} optionLabel="name" placeholder="Select a City" />
<MultiSelect value={selectedCities1} options={cities} onChange={(e) => setSelectedCities1(e.value)} optionLabel="name" placeholder="Select a City" maxSelectedLabels={3} />
<h5>Chips</h5>
<MultiSelect value={selectedCities2} options={cities} onChange={(e) => setSelectedCities2(e.value)} optionLabel="name" placeholder="Select a City" display="chip" />
Expand Down Expand Up @@ -519,7 +519,7 @@ const MultiSelectDemo = () => {
<div className="multiselect-demo">
<div className="card">
<h5>Basic</h5>
<MultiSelect value={selectedCities1} options={cities} onChange={(e) => setSelectedCities1(e.value)} optionLabel="name" placeholder="Select a City" />
<MultiSelect value={selectedCities1} options={cities} onChange={(e) => setSelectedCities1(e.value)} optionLabel="name" placeholder="Select a City" maxSelectedLabels={3} />
<h5>Chips</h5>
<MultiSelect value={selectedCities2} options={cities} onChange={(e) => setSelectedCities2(e.value)} optionLabel="name" placeholder="Select a City" display="chip" />
Expand Down Expand Up @@ -701,7 +701,7 @@ const MultiSelectDemo = () => {
<div className="multiselect-demo">
<div className="card">
<h5>Basic</h5>
<MultiSelect value={selectedCities1} options={cities} onChange={(e) => setSelectedCities1(e.value)} optionLabel="name" placeholder="Select a City" />
<MultiSelect value={selectedCities1} options={cities} onChange={(e) => setSelectedCities1(e.value)} optionLabel="name" placeholder="Select a City" maxSelectedLabels={3} />
<h5>Chips</h5>
<MultiSelect value={selectedCities2} options={cities} onChange={(e) => setSelectedCities2(e.value)} optionLabel="name" placeholder="Select a City" display="chip" />
Expand Down Expand Up @@ -1223,7 +1223,7 @@ const groupedCities = [
<tr>
<td>maxSelectedLabels</td>
<td>number</td>
<td>3</td>
<td>null</td>
<td>Decides how many selected item labels to show at most.</td>
</tr>
<tr>
Expand Down

0 comments on commit 13abd8c

Please sign in to comment.