Skip to content

Commit

Permalink
fix(QChip): use sepparate attrs for chip and remove button quasarfram…
Browse files Browse the repository at this point in the history
  • Loading branch information
pdanpdan committed Oct 5, 2022
1 parent 9744902 commit 84afaec
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions ui/src/components/chip/QChip.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,17 @@ export default Vue.extend({
},

attrs () {
return this.disable === true
const chip = this.disable === true
? { tabindex: -1, 'aria-disabled': 'true' }
: {
tabindex: this.tabindex || 0,
role: 'button',
'aria-hidden': 'false',
'aria-label': this.removeAriaLabel || this.$q.lang.label.remove
}
: { tabindex: this.tabindex || 0 }
const remove = {
...chip,
role: 'button',
'aria-hidden': 'false',
'aria-label': this.removeAriaLabel || this.$q.lang.label.remove
}

return { chip, remove }
}
},

Expand Down Expand Up @@ -164,7 +167,7 @@ export default Vue.extend({
h(QIcon, {
staticClass: 'q-chip__icon q-chip__icon--remove cursor-pointer',
props: { name: this.removeIcon },
attrs: this.attrs,
attrs: this.attrs.remove,
on: cache(this, 'non', {
click: this.__onRemove,
keyup: this.__onRemove
Expand All @@ -186,7 +189,7 @@ export default Vue.extend({
}

this.isClickable === true && Object.assign(data, {
attrs: this.attrs,
attrs: this.attrs.chip,
on: cache(this, 'click', {
click: this.__onClick,
keyup: this.__onKeyup
Expand Down

0 comments on commit 84afaec

Please sign in to comment.