File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
src/dashboard/Data/Config Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,6 @@ export default class AddArrayEntryDialog extends React.Component {
3030 }
3131 }
3232
33- valid ( ) {
34- if ( this . state . value === '' ) {
35- return false ;
36- }
37- if ( this . state . showMismatchRow && ! this . state . mismatchConfirmed ) {
38- return false ;
39- }
40- return true ;
41- }
4233
4334 getValue ( ) {
4435 try {
@@ -87,6 +78,10 @@ export default class AddArrayEntryDialog extends React.Component {
8778 }
8879
8980 render ( ) {
81+ const confirmDisabled =
82+ this . state . value === '' ||
83+ ( this . state . showMismatchRow && ! this . state . mismatchConfirmed ) ;
84+
9085 const addEntryModal = (
9186 < Modal
9287 type = { Modal . Types . INFO }
@@ -96,7 +91,7 @@ export default class AddArrayEntryDialog extends React.Component {
9691 cancelText = "Cancel"
9792 onCancel = { this . props . onCancel }
9893 onConfirm = { this . handleConfirm . bind ( this ) }
99- disabled = { ! this . valid ( ) }
94+ disabled = { confirmDisabled }
10095 >
10196 < Field
10297 label = {
You can’t perform that action at this time.
0 commit comments