Refactor defaultFocus value
parent
cb9c6718ee
commit
fa3aae4085
|
@ -106,11 +106,10 @@ export default {
|
||||||
return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
|
return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
|
||||||
},
|
},
|
||||||
autoFocusAccept() {
|
autoFocusAccept() {
|
||||||
return this.confirmation.defaultFocus === 'accept' ? true : false;
|
return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
|
||||||
},
|
},
|
||||||
autoFocusReject() {
|
autoFocusReject() {
|
||||||
// backward compatibility
|
return this.confirmation.defaultFocus === 'reject' ? true : false;
|
||||||
return this.confirmation.defaultFocus !== 'accept' ? true : false;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -195,7 +195,7 @@ export default {
|
||||||
<tr>
|
<tr>
|
||||||
<td>defaultFocus</td>
|
<td>defaultFocus</td>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
<td>null</td>
|
<td>accept</td>
|
||||||
<td>Element to receive the focus when the dialog gets visible, valid values are "accept" and "reject".</td>
|
<td>Element to receive the focus when the dialog gets visible, valid values are "accept" and "reject".</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in New Issue