Surya V | de23ea2 | 2024-07-11 15:19:46 +0530 | [diff] [blame] | 1 | import i18n from '@/i18n'; |
| 2 | export const expandRowLabel = i18n.global.t('global.table.expandTableRow'); |
SurenNeware | ba91c49 | 2020-10-27 14:18:54 +0530 | [diff] [blame] | 3 | |
Dixsie Wolmers | b53e086 | 2020-09-08 14:13:38 -0500 | [diff] [blame] | 4 | const TableRowExpandMixin = { |
Dixsie Wolmers | b53e086 | 2020-09-08 14:13:38 -0500 | [diff] [blame] | 5 | methods: { |
| 6 | toggleRowDetails(row) { |
| 7 | row.toggleDetails(); |
| 8 | row.detailsShowing |
Surya V | de23ea2 | 2024-07-11 15:19:46 +0530 | [diff] [blame] | 9 | ? (this.expandRowLabel = i18n.global.t('global.table.expandTableRow')) |
| 10 | : (this.expandRowLabel = i18n.global.t( |
| 11 | 'global.table.collapseTableRow', |
| 12 | )); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 13 | }, |
| 14 | }, |
Dixsie Wolmers | b53e086 | 2020-09-08 14:13:38 -0500 | [diff] [blame] | 15 | }; |
| 16 | |
| 17 | export default TableRowExpandMixin; |