Skip to content

Commit 5795ea7

Browse files
authored
Update exported drawTextCell to handle wrapping. (#1032)
* Update exported drawTextCell to handle wrapping. * Update data-grid-lib.ts
1 parent 91df13a commit 5795ea7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/core/src/internal/data-grid/render/data-grid-lib.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,13 @@ export function prepTextCell(
444444
}
445445

446446
/** @category Drawing */
447-
export function drawTextCellExternal(args: BaseDrawArgs, data: string, contentAlign?: BaseGridCell["contentAlign"]) {
447+
export function drawTextCellExternal(
448+
args: BaseDrawArgs,
449+
data: string,
450+
contentAlign?: BaseGridCell["contentAlign"],
451+
allowWrapping?: boolean,
452+
hyperWrapping?: boolean
453+
) {
448454
const { rect, ctx, theme } = args;
449455

450456
ctx.fillStyle = theme.textDark;
@@ -455,7 +461,9 @@ export function drawTextCellExternal(args: BaseDrawArgs, data: string, contentAl
455461
theme: theme,
456462
},
457463
data,
458-
contentAlign
464+
contentAlign,
465+
allowWrapping,
466+
hyperWrapping
459467
);
460468
}
461469

0 commit comments

Comments
 (0)