1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Desktop: Resolves #2799: Disable prompt dialog OK button when input is empty (#2905)

This commit is contained in:
Siddhant Sehgal 2020-04-14 16:50:05 +05:30 committed by GitHub
parent f6fed72b64
commit 30c175ef29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,7 @@ class PromptDialog extends React.Component {
const buttonComps = [];
if (buttonTypes.indexOf('ok') >= 0) {
buttonComps.push(
<button key="ok" style={styles.button} onClick={() => onClose(true, 'ok')}>
<button key="ok" disabled={!this.state.answer} style={styles.button} onClick={() => onClose(true, 'ok')}>
{_('OK')}
</button>
);