Hi, i have this code and already applied enableStickyHeader props. buat it's not working properly. Thank you for assistance
<>
{selectedRows.length > 0 && (
<ActionBar
selectedIndex={selectedRows.length}
handleDeselectAll={handleDeselectAll}
/>
)}
<GridComponent
dataSource={pagedData}
enableStickyHeader
height="100%"
width="100%"
allowTextWrap
textWrapSettings={{ wrapMode: "Header" }}
selectionSettings={{
checkboxOnly: true,
type: "Multiple",
}}
rowSelected={handleRowSelected}
rowDeselected={handleRowDeselected}
ref={(g) => (grid = g)}
autoFit
>
<ColumnsDirective>
<ColumnDirective type="checkbox" width={60} freeze="Left" />
{columns
.filter((column) => column.isVisible) // Filter hanya kolom yang isVisible true
.map((column, index) => (
<ColumnDirective
key={index}
field={column.field}
headerText={column.headerText}
width={column.width}
template={column.template}
freeze={column.freeze}
visible={column.isVisible}
textAlign={column.textAlign}
autoFit
/>
))}
</ColumnsDirective>
<Inject services={[Edit, CommandColumn, Page, Freeze, Resize]} />
</GridComponent>
<Stack flexDirection="row" justifyContent="space-between" mt="14px">
<Stack flexDirection="row" alignItems="center" gap="8px">
<Typography
sx={{
fontSize: "14px",
lineHeight: "20px",
fontWeight: 400,
color: "#212529",
}}
>
Baris per halaman
</Typography>
<Select
value={pageSize}
onChange={(e) => {
setCurrentPage("1");
setPageSize(e.target.value);
}}
fullWidth
sx={{
width: "72px",
height: "40px",
backgroundColor: "#ffffff",
}}
>
{pageSizeOptions.map((size) => (
<MenuItem key={size} value={size.toString()}>
{size}
</MenuItem>
))}
</Select>
</Stack>
<Stack flexDirection="row" alignItems="center">
<Stack flexDirection="row" alignItems="center" gap="8px">
<Box>
<Select
value={currentPage}
onChange={(e) => onPageChange(parseInt(e.target.value, 10))}
fullWidth
sx={{
width: "72px",
height: "40px",
backgroundColor: "#ffffff",
}}
>
{Array.from({ length: parseInt(totalPages, 10) }, (_, i) => (
<MenuItem key={i + 1} value={(i + 1).toString()}>
{i + 1}
</MenuItem>
))}
</Select>
</Box>
<Typography
sx={{
fontSize: "14px",
fontWeight: 400,
lineHeight: "20px",
color: "#212529",
}}
>
dari {totalPages} Halaman
</Typography>
</Stack>
<Pagination
count={parseInt(totalPages, 10)}
page={parseInt(currentPage, 10)}
onChange={(_, page) => onPageChange(page)}
color="primary"
size="small"
/>
</Stack>
</Stack>
</>