| 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(); |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 8 | // When details are shown, label should instruct to collapse; otherwise, expand |
| 9 | this.expandRowLabel = row.detailsShowing |
| 10 | ? i18n.global.t('global.table.collapseTableRow') |
| 11 | : i18n.global.t('global.table.expandTableRow'); |
| Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 12 | }, |
| 13 | }, |
| Dixsie Wolmers | b53e086 | 2020-09-08 14:13:38 -0500 | [diff] [blame] | 14 | }; |
| 15 | |
| 16 | export default TableRowExpandMixin; |