Skip to content

Commit

Permalink
Fix #5555: BodyCell frozen issue (#5557)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Dec 8, 2023
1 parent 720671b commit a9b3aeb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/doc/datatable/theming/tailwinddoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Tailwind = {
context?.size === 'small' ? 'p-2' : context?.size === 'large' ? 'p-5' : 'p-4', // Size
'dark:text-white/80 dark:border-blue-900/40', // Dark Mode
{
'sticky bg-inherit': props?.frozen || props?.frozen === '', // Frozen Columns
'sticky bg-inherit': props && (props.frozen || props.frozen === ''), // Frozen Columns
'border-x border-y': context.showGridlines
}
)
Expand Down
5 changes: 2 additions & 3 deletions components/lib/datatable/BodyCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ export const BodyCell = React.memo((props) => {
const { ptm, ptmo, cx } = props.ptCallbacks;

const getColumnProp = (name) => ColumnBase.getCProp(props.column, name);
const getColumnProps = (column) => ColumnBase.getCProps(column);
const getColumnProps = () => ColumnBase.getCProps(props.column);

const getColumnPTOptions = (key) => {
const cProps = getColumnProps(props.column);

const cProps = getColumnProps();
const columnMetaData = {
props: cProps,
parent: props.metaData,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/passthrough/tailwind/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@ const Tailwind = {
context.size === 'small' ? 'p-2' : context.size === 'large' ? 'p-5' : 'p-4', // Size
'dark:text-white/80 dark:border-blue-900/40', // Dark Mode
{
'sticky bg-inherit': props.frozen || props.frozen === '', // Frozen Columns
'sticky bg-inherit': props && (props.frozen || props.frozen === ''), // Frozen Columns
'border-x border-y': context.showGridlines
}
)
Expand Down

0 comments on commit a9b3aeb

Please sign in to comment.