fix: ajuste na largura da coluna

This commit is contained in:
Alessandro Gonçaalves 2025-11-10 14:29:28 -03:00
parent 135c0b3282
commit b17b4390d0
1 changed files with 4 additions and 4 deletions

View File

@ -2805,10 +2805,10 @@ export default function Teste() {
{/* Container com coluna fixa e scroll horizontal */} {/* Container com coluna fixa e scroll horizontal */}
<div className="flex max-h-[500px] overflow-hidden"> <div className="flex max-h-[500px] overflow-hidden">
{/* Coluna fixa - Descrição */} {/* Coluna fixa - Descrição */}
<div className="flex-shrink-0 border-r border-gray-200"> <div className="flex-shrink-0 border-r border-gray-200" style={{ minWidth: '300px', width: 'auto' }}>
{/* Header fixo da descrição */} {/* Header fixo da descrição */}
<div className="sticky top-0 z-20 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-200"> <div className="sticky top-0 z-20 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-200">
<div className="px-4 py-2 text-left text-xs font-semibold text-gray-700 uppercase tracking-wide w-[300px] min-w-[300px]"> <div className="px-4 py-2 text-left text-xs font-semibold text-gray-700 uppercase tracking-wide whitespace-nowrap">
Descrição Descrição
</div> </div>
</div> </div>
@ -2826,9 +2826,9 @@ export default function Teste() {
<div <div
key={index} key={index}
className={`text-sm border-b border-gray-100 transition-all duration-200 ease-in-out ${getRowStyle(row)}`} className={`text-sm border-b border-gray-100 transition-all duration-200 ease-in-out ${getRowStyle(row)}`}
style={{ height: '40px', display: 'flex', alignItems: 'center' }} style={{ height: '40px', display: 'flex', alignItems: 'center', minWidth: 'max-content' }}
> >
<div className="px-4 py-1 w-[300px] min-w-[300px] whitespace-nowrap overflow-hidden flex items-center h-full"> <div className="px-4 py-1 whitespace-nowrap flex items-center h-full" style={{ minWidth: 'max-content' }}>
<div style={getIndentStyle(row.level)} className="flex items-center h-full"> <div style={getIndentStyle(row.level)} className="flex items-center h-full">
{renderCellContent(row)} {renderCellContent(row)}
</div> </div>