@@ -226,33 +226,31 @@ function DataTableHeaders({ className }: { className?: string }) {
226226 < Table . Row >
227227 { hasSelection && (
228228 < Table . Head style = { { width : 52 } } className = "astw:pl-3!" >
229- < div className = "astw:flex astw:items-center" >
230- < Checkbox . Root
231- checked = { isAllSelected }
232- indeterminate = { isIndeterminate }
233- onCheckedChange = { ( checked ) => {
234- if ( checked ) {
235- selectAllRows ?.( ) ;
236- } else {
237- clearSelection ?.( ) ;
238- }
239- } }
240- aria-label = { t ( "selectAll" ) }
241- className = { cn (
242- "astw:flex astw:size-4 astw:items-center astw:justify-center astw:rounded-xs astw:border astw:border-input" ,
243- "astw:data-checked:bg-primary astw:data-checked:border-primary astw:data-checked:text-primary-foreground" ,
244- "astw:data-indeterminate:bg-primary astw:data-indeterminate:border-primary astw:data-indeterminate:text-primary-foreground" ,
229+ < Checkbox . Root
230+ checked = { isAllSelected }
231+ indeterminate = { isIndeterminate }
232+ onCheckedChange = { ( checked ) => {
233+ if ( checked ) {
234+ selectAllRows ?.( ) ;
235+ } else {
236+ clearSelection ?.( ) ;
237+ }
238+ } }
239+ aria-label = { t ( "selectAll" ) }
240+ className = { cn (
241+ "astw:flex astw:size-4 astw:items-center astw:justify-center astw:rounded-xs astw:border astw:border-input" ,
242+ "astw:data-checked:bg-primary astw:data-checked:border-primary astw:data-checked:text-primary-foreground" ,
243+ "astw:data-indeterminate:bg-primary astw:data-indeterminate:border-primary astw:data-indeterminate:text-primary-foreground" ,
244+ ) }
245+ >
246+ < Checkbox . Indicator className = "astw:flex astw:data-unchecked:hidden" >
247+ { isIndeterminate ? (
248+ < Minus className = "astw:size-3" />
249+ ) : (
250+ < Check className = "astw:size-3" />
245251 ) }
246- >
247- < Checkbox . Indicator className = "astw:flex astw:data-unchecked:hidden" >
248- { isIndeterminate ? (
249- < Minus className = "astw:size-3" />
250- ) : (
251- < Check className = "astw:size-3" />
252- ) }
253- </ Checkbox . Indicator >
254- </ Checkbox . Root >
255- </ div >
252+ </ Checkbox . Indicator >
253+ </ Checkbox . Root >
256254 </ Table . Head >
257255 ) }
258256 { columns ?. map ( ( col , colIndex ) => {
@@ -401,21 +399,19 @@ function DataTableBody({ className }: { className?: string }) {
401399 className = "astw:pl-3!"
402400 onClick = { ( e ) => e . stopPropagation ( ) }
403401 >
404- < div className = "astw:flex astw:items-center" >
405- < Checkbox . Root
406- checked = { selected }
407- onCheckedChange = { ( ) => toggleRowSelection ( row ) }
408- aria-label = { t ( "selectRow" ) }
409- className = { cn (
410- "astw:flex astw:size-4 astw:items-center astw:justify-center astw:rounded-xs astw:border astw:border-input" ,
411- "astw:data-checked:bg-primary astw:data-checked:border-primary astw:data-checked:text-primary-foreground" ,
412- ) }
413- >
414- < Checkbox . Indicator className = "astw:flex astw:data-unchecked:hidden" >
415- < Check className = "astw:size-3" />
416- </ Checkbox . Indicator >
417- </ Checkbox . Root >
418- </ div >
402+ < Checkbox . Root
403+ checked = { selected }
404+ onCheckedChange = { ( ) => toggleRowSelection ( row ) }
405+ aria-label = { t ( "selectRow" ) }
406+ className = { cn (
407+ "astw:flex astw:size-4 astw:items-center astw:justify-center astw:rounded-xs astw:border astw:border-input" ,
408+ "astw:data-checked:bg-primary astw:data-checked:border-primary astw:data-checked:text-primary-foreground" ,
409+ ) }
410+ >
411+ < Checkbox . Indicator className = "astw:flex astw:data-unchecked:hidden" >
412+ < Check className = "astw:size-3" />
413+ </ Checkbox . Indicator >
414+ </ Checkbox . Root >
419415 </ Table . Cell >
420416 ) }
421417 { columns ?. map ( ( col , colIndex ) => {
0 commit comments