mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Refactor #5437 - For DataViewLayoutOptions
This commit is contained in:
parent
d6f209ad08
commit
fd7245da44
6 changed files with 44 additions and 65 deletions
|
@ -5,7 +5,7 @@
|
|||
:key="getOptionRenderKey(option)"
|
||||
v-ripple
|
||||
:tabindex="findTabindex(option, i)"
|
||||
:aria-label="getOptionLabel(option)"
|
||||
:aria-label="getOptionLabel(option, i)"
|
||||
:role="multiple ? 'checkbox' : 'radio'"
|
||||
:aria-checked="isSelected(option)"
|
||||
:aria-disabled="isOptionDisabled(option)"
|
||||
|
@ -54,7 +54,11 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
getOptionLabel(option) {
|
||||
getOptionLabel(option, index) {
|
||||
if (this.$parent.$name === 'DataViewLayoutOptions') {
|
||||
return index === 0 ? this.$parent.listViewAriaLabel : this.$parent.gridViewAriaLabel;
|
||||
}
|
||||
|
||||
return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : option;
|
||||
},
|
||||
getOptionValue(option) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue