Skip to content

Commit

Permalink
feat(table): enable header hidding
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaubree committed Oct 26, 2023
1 parent 3fd98cb commit 4fa0012
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/table/UTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface Sort { column?: string; direction?: 'asc' | 'desc' }
const props = withDefaults(defineProps<{
sortBy?: string | ((a: T, b: T) => void)
rows?: T[]
hideHeader?: boolean
columns?: { key: string; sortable?: boolean; class?: string; [key: string]: any }[]
columnAttribute?: string
sort?: Sort
Expand Down Expand Up @@ -70,7 +71,7 @@ function onSort(column: { key: string; direction?: 'asc' | 'desc' }) {
<template>
<div :class="config.wrapper">
<table :class="[config.base, config.divide]">
<thead :class="config.thead">
<thead v-if="!hideHeader" :class="config.thead">
<tr :class="config.tr.base">
<th scope="col" class="pl-4">
<UCheckbox v-if="selected" :is-checked="isIndeterminate || selected?.length === rows.length" :is-indeterminate="isIndeterminate" @change="selected = $event.target.checked ? rows : []" />
Expand Down

0 comments on commit 4fa0012

Please sign in to comment.