Skip to content

Commit

Permalink
1. added focustrapAutoFocus 2. focustrapAutoFocus is props autoFocus …
Browse files Browse the repository at this point in the history
…from the column
  • Loading branch information
Sankaralingam Seranthian committed Feb 6, 2023
1 parent f54f71d commit 334afa8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/datatable/ColumnFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
v-if="overlayVisible"
:ref="overlayRef"
:id="overlayId"
v-focustrap="{ autoFocus: true }"
v-focustrap="{ autoFocus: focustrapAutoFocus }"
:aria-modal="overlayVisible"
role="dialog"
:class="overlayClass"
Expand Down Expand Up @@ -145,6 +145,10 @@ export default {
type: Boolean,
default: true
},
autoFocus: {
type: Boolean,
default: true
},
showClearButton: {
type: Boolean,
default: true
Expand Down Expand Up @@ -199,7 +203,8 @@ export default {
return {
overlayVisible: false,
defaultMatchMode: null,
defaultOperator: null
defaultOperator: null,
focustrapAutoFocus: this.autoFocus
};
},
overlay: null,
Expand Down
1 change: 1 addition & 0 deletions components/datatable/HeaderCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
:showApplyButton="columnProp('showApplyButton')"
:showMatchModes="columnProp('showFilterMatchModes')"
:showAddButton="columnProp('showAddButton')"
:autoFocus="columnProp('autoFocus')"
:matchModeOptions="columnProp('filterMatchModeOptions')"
:maxConstraints="columnProp('maxConstraints')"
@operator-change="$emit('operator-change', $event)"
Expand Down
1 change: 1 addition & 0 deletions components/datatable/TableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
:showApplyButton="columnProp(col, 'showApplyButton')"
:showMatchModes="columnProp(col, 'showFilterMatchModes')"
:showAddButton="columnProp(col, 'showAddButton')"
:autoFocus="columnProp(col, 'autoFocus')"
:matchModeOptions="columnProp(col, 'filterMatchModeOptions')"
:maxConstraints="columnProp(col, 'maxConstraints')"
@operator-change="$emit('operator-change', $event)"
Expand Down

0 comments on commit 334afa8

Please sign in to comment.