_onSubmit(value) {
        const { okDisabled, onSubmit } = this.props;

        if (typeof okDisabled === 'undefined' || !okDisabled) {
            this.setState({ submitting: true });

            // Invoke the React Compnent prop onSubmit if any.
            const r = !onSubmit || onSubmit(value);

            // If the invocation returns a thenable, await its resolution;
            // otherwise, treat the return value as a boolean indicating whether
            // the submission has completed successfully.
            let then;

            if (r) {
                switch (typeof r) {
                case 'function':
                case 'object':
                    then = r.then;
                    break;
                }
            }
            if (typeof then === 'function' && then.length === 2) {
                then.call(r, this._onSubmitFulfilled, this._onSubmitRejected);
            } else if (r) {
                this._onSubmitFulfilled();
            } else {
                this._onSubmitRejected();
            }
        }
    }
/**
     * Submits this dialog. If the React <tt>Component</tt> prop
     * <tt>onSubmit</tt> is defined, the function that is the value of the prop
     * is invoked. If the function returns a <tt>thenable</tt>, then the
     * resolution of the <tt>thenable</tt> is awaited. If the submission
     * completes successfully, a redux action will be dispatched to hide this
     * dialog.
     *
     * @private
     * @param {string} value - The submitted value if any.
     * @returns {void}
     */
Submits this dialog. If the React Component prop
onSubmit is defined, the function that is the value of the prop
is invoked. If the function returns a thenable, then the
resolution of the thenable is awaited. If the submission
completes successfully, a redux action will be dispatched to hide this
dialog.

@private
@param {string} value - The submitted value if any.
@returns {void}
Submits this dialog . If the React Component prop onSubmit is defined the function that is the value of the prop is invoked . If the function returns a thenable then the resolution of the thenable is awaited . If the submission completes successfully a redux action will be dispatched to hide this dialog . @private @param { string } value - The submitted value if any . @returns { void }
_onSubmit(value) {
        const { okDisabled, onSubmit } = this.props;
        if (typeof okDisabled === 'undefined' || !okDisabled) {
            this.setState({ submitting: true });
            const r = !onSubmit || onSubmit(value);
            let then;
            if (r) {
                switch (typeof r) {
                case 'function':
                case 'object':
                    then = r.then;
                    break;
                }
            }
            if (typeof then === 'function' && then.length === 2) {
                then.call(r, this._onSubmitFulfilled, this._onSubmitRejected);
            } else if (r) {
                this._onSubmitFulfilled();
            } else {
                this._onSubmitRejected();
            }
        }
    }
_onSubmit ( value ) { const { okDisabled , onSubmit } = this . props ; if ( typeof okDisabled === 'undefined' || ! okDisabled ) { this . setState ( { submitting : true } ) ; const r = ! onSubmit || onSubmit ( value ) ; let then ; if ( r ) { switch ( typeof r ) { case 'function' : case 'object' : then = r . then ; break ; } } if ( typeof then === 'function' && then . length === 2 ) { then . call ( r , this . _onSubmitFulfilled , this . _onSubmitRejected ) ; } else if ( r ) { this . _onSubmitFulfilled ( ) ; } else { this . _onSubmitRejected ( ) ; } } }
Submits this dialog.
Submits this dialog .
// Invoke the React Compnent prop onSubmit if any. // If the invocation returns a thenable, await its resolution; // otherwise, treat the return value as a boolean indicating whether // the submission has completed successfully.