Browse Source

Disable list title validation button when list title is empty (#11475)

pull/4/head
ThibG 4 years ago
committed by Eugen Rochko
parent
commit
089c641020
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/javascript/mastodon/features/list_editor/components/edit_list_form.js
  2. +1
    -1
      app/javascript/mastodon/features/lists/components/new_list_form.js

+ 1
- 1
app/javascript/mastodon/features/list_editor/components/edit_list_form.js View File

@ -11,7 +11,7 @@ const messages = defineMessages({
const mapStateToProps = state => ({
value: state.getIn(['listEditor', 'title']),
disabled: !state.getIn(['listEditor', 'isChanged']),
disabled: !state.getIn(['listEditor', 'isChanged']) || !state.getIn(['listEditor', 'title']),
});
const mapDispatchToProps = dispatch => ({

+ 1
- 1
app/javascript/mastodon/features/lists/components/new_list_form.js View File

@ -66,7 +66,7 @@ class NewListForm extends React.PureComponent {
</label>
<IconButton
disabled={disabled}
disabled={disabled || !value}
icon='plus'
title={title}
onClick={this.handleClick}

Loading…
Cancel
Save