Skip to content

Commit

Permalink
fix(heuristic-table): ignoring overrideContentWidth option
Browse files Browse the repository at this point in the history
  • Loading branch information
jsamr committed Mar 4, 2021
1 parent 3a75cbe commit 8d9224a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/heuristic-table-plugin/src/HTMLTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ function Container({
const HTMLTable = memo(function HTMLTable({
layout,
TDefaultRenderer,
settings,
config,
...props
}: HTMLTableProps) {
const tableWidth = layout.totalWidth;
const containerWidth = props.sharedProps.contentWidth;
const containerWidth = settings.contentWidth;
return (
<TDefaultRenderer
{...props}
Expand Down
1 change: 1 addition & 0 deletions packages/heuristic-table-plugin/src/shared-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export interface HeuristicTablePluginConfig {
export interface HTMLTableProps extends CustomTagRendererProps<TBlock> {
layout: TableLayout;
config: HeuristicTablePluginConfig;
settings: Settings;
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/heuristic-table-plugin/src/useHtmlTableProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default function useHtmlTableProps(
const layout = useTableLayout({ tnode, settings });
return {
layout,
settings,
config: table || {},
sharedProps,
tnode,
Expand Down

0 comments on commit 8d9224a

Please sign in to comment.