Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix being able to add more than 4 hashtags to hashtag column in web UI (
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Mar 9, 2022
1 parent db04dfc commit e54fd73
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@ class ColumnSettings extends React.PureComponent {
}
};

onSelect = mode => value => this.props.onChange(['tags', mode], value);
onSelect = mode => value => {
const oldValue = this.tags(mode);

// Prevent changes that add more than 4 tags, but allow removing
// tags that were already added before
if ((value.length > 4) && !(value < oldValue)) {
return;
}

this.props.onChange(['tags', mode], value);
};

onToggle = () => {
if (this.state.open && this.hasTags()) {
Expand Down

0 comments on commit e54fd73

Please sign in to comment.