Skip to content

Commit

Permalink
[core] TagInput: use undefined instead of null to hide clearButton (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsre authored and adidahiya committed Mar 22, 2019
1 parent 4d5f150 commit 00b7602
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export class MultiSelectExample extends React.PureComponent<IExampleProps, IMult
const maybeCreateNewItemFromQuery = allowCreate ? createFilm : undefined;
const maybeCreateNewItemRenderer = allowCreate ? renderCreateFilmOption : null;

const clearButton = films.length > 0 ? <Button icon="cross" minimal={true} onClick={this.handleClear} /> : null;
const clearButton =
films.length > 0 ? <Button icon="cross" minimal={true} onClick={this.handleClear} /> : undefined;

return (
<Example options={this.renderOptions()} {...this.props}>
Expand Down

1 comment on commit 00b7602

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[core] TagInput: use undefined instead of null to hide clearButton (#3436)

Previews: documentation | landing | table

Please sign in to comment.