Skip to content

Commit

Permalink
fix: labels in table checkboxes (#906)
Browse files Browse the repository at this point in the history
* fix: labels in table checkboxes

* chore: update table doc

Co-authored-by: Lee Chase <[email protected]>
  • Loading branch information
lee-chase and lee-chase authored May 22, 2020
1 parent 33a2893 commit 4acf0c7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
v-model="dataChecked"
@change="onChange"
ref="rowChecked"
:aria-label="ariaLabelForBatchCheckbox || `Select row ${value} for batch action`"
:label="ariaLabelForBatchCheckbox || `Select row ${value} for batch action`"
hideLabel
/>
</td>
<slot />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Like sorting and filtering it is the users responsibility to deal with edited da
- data: Two dimensional array of strings.
- rows-selected: An array containing the selected row values. Supports v-model via the row-select-changes event.

- action-bar-label: (optional) alternative aria label for the toolbar
- auto-width: (optional) table will size use auto sizing
- borderless: (optional) table will have no border
- overflow-menu(optional) : An array of overflow menu labels. On click CvDataTable will raise an 'overflow-menu-click' event passing an object containing menuIndex, menuLabel and rowValue
Expand All @@ -93,6 +92,10 @@ Like sorting and filtering it is the users responsibility to deal with edited da
- searchPlaceholder: (optional) { type: String, default: 'Search' },
- searchClearLabel: (optional) { type: String, default: 'Clear search' },
- batchCancelLabel: (optional) { type: String, default: 'Cancel' },
- actionBarAriaLabel: { type: String, default: 'Table Action Bar' },
- collapseAllAriaLabel: { type: String, default: 'Collapse all rows' },
- expandAllAriaLabel: { type: String, default: 'Expand all rows' },
- selectAllAriaLabel: { type: String, default: 'Select all rows' },

## Scoped slots

Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/components/cv-data-table/cv-data-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
value="headingCheck"
v-model="headingChecked"
@change="onHeadingCheckChange"
:label="selectAllAriaLabel"
hideLabel
/>
</th>
<slot name="headings">
Expand Down Expand Up @@ -197,6 +199,7 @@ export default {
actionBarAriaLabel: { type: String, default: 'Table Action Bar' },
collapseAllAriaLabel: { type: String, default: 'Collapse all rows' },
expandAllAriaLabel: { type: String, default: 'Expand all rows' },
selectAllAriaLabel: { type: String, default: 'Select all rows' },
autoWidth: Boolean,
batchCancelLabel: { type: String, default: 'cancel' },
borderless: Boolean,
Expand Down

0 comments on commit 4acf0c7

Please sign in to comment.