Skip to content

Commit

Permalink
feat(Table): handle rowClass property in columns (nuxt#1632)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt authored and binhth-1206 committed Jul 28, 2024
1 parent 72ed87c commit 86d33a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/content/2.components/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Use the `columns` prop to configure which columns to display. It's an array of o
- `sortable` - Whether the column is sortable. Defaults to `false`.
- `direction` - The sort direction to use on first click. Defaults to `asc`.
- `class` - The class to apply to the column cells.
- `rowClass` - The class to apply to the data column cells.
- `sort` - Pass your own `sort` function. Defaults to a simple _greater than_ / _less than_ comparison.

::component-example{class="grid"}
Expand Down
5 changes: 1 addition & 4 deletions src/runtime/components/data/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,11 @@ import { upperFirst } from 'scule'
import { defu } from 'defu'
import { pick } from 'lodash-es'
import { useVModel } from '@vueuse/core'
<<<<<<< HEAD
import UIcon from '../elements/Icon.vue'
import UButton from '../elements/Button.vue'
import UProgress from '../elements/Progress.vue'
import UCheckbox from '../forms/Checkbox.vue'
import UPagination from '../navigation/Pagination.vue'
=======
import { UIcon, UButton, UProgress, UCheckbox } from '#components'
>>>>>>> feat(Icon)!: migrate from `@egoist/tailwindcss-icons` to new `@nuxt/icon` (#1789)
import { useUI } from '../../composables/useUI'
import { mergeConfig, get } from '../../utils'
import type { Strategy, Button, ProgressColor, ProgressAnimation } from '../../types'
Expand Down Expand Up @@ -137,6 +133,7 @@ interface Column {
sort?: (a: any, b: any, direction: 'asc' | 'desc') => number
direction?: 'asc' | 'desc'
class?: string
rowClass?: string
[key: string]: any
}
Expand Down

0 comments on commit 86d33a6

Please sign in to comment.