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];
|
||||
},
|
||||
autoFocusAccept() {
|
||||
return this.confirmation.defaultFocus === 'accept' ? true : false;
|
||||
return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
|
||||
},
|
||||
autoFocusReject() {
|
||||
// backward compatibility
|
||||
return this.confirmation.defaultFocus !== 'accept' ? true : false;
|
||||
return this.confirmation.defaultFocus === 'reject' ? true : false;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
|
@ -195,7 +195,7 @@ export default {
|
|||
<tr>
|
||||
<td>defaultFocus</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>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue