[Glitch] Disable list title validation button when list title is empty
Port 089c6410208d294e7f1995e000bd796d4625246f to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
		
							parent
							
								
									e50554391a
								
							
						
					
					
						commit
						8b57d704dc
					
				@ -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 => ({
 | 
			
		||||
 | 
			
		||||
@ -66,7 +66,7 @@ export default class NewListForm extends React.PureComponent {
 | 
			
		||||
        </label>
 | 
			
		||||
 | 
			
		||||
        <IconButton
 | 
			
		||||
          disabled={disabled}
 | 
			
		||||
          disabled={disabled || !value}
 | 
			
		||||
          icon='plus'
 | 
			
		||||
          title={title}
 | 
			
		||||
          onClick={this.handleClick}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user