PrintConfig
Configuration options for the print plugin
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
button? | boolean | Show print button in toolbar (default: false) When true, adds a print icon to the grid toolbar |
orientation? | PrintOrientation | Page orientation (default: ‘landscape’) Grids typically print better in landscape |
warnThreshold? | number | Show a confirmation dialog when row count exceeds this threshold (default: 500) |
maxRows? | number | Maximum rows to print (default: 0 = unlimited) |
includeTitle? | boolean | Include grid title in print output (default: true) Uses shell.header.title if available |
includeTimestamp? | boolean | Include timestamp in print footer (default: true) |
title? | string | Custom print title (overrides shell title) |
isolate? | boolean | Print in isolation mode (default: false) |
Property Details
Section titled “Property Details”warnThreshold
Section titled “warnThreshold”Show a confirmation dialog when row count exceeds this threshold (default: 500)
When the number of rows to print exceeds this value, the user is shown a confirmation dialog asking if they want to proceed. This gives users a chance to cancel before a potentially slow print operation.
Set to 0 to disable the warning dialog.
Note: This only shows a warning - it does NOT limit the rows printed.
Use maxRows to actually limit the output.
// Warn at 500+ rows, but allow printing all if confirmednew PrintPlugin({ warnThreshold: 500 })
// Warn at 1000+ rows AND limit to 500 rows maxnew PrintPlugin({ warnThreshold: 1000, maxRows: 500 })maxRows
Section titled “maxRows”Maximum rows to print (default: 0 = unlimited)
When set to a positive number, only the first N rows will be printed. This is a hard limit - excess rows are not rendered regardless of user choice.
Use warnThreshold to show a confirmation dialog instead of hard-limiting.
// Hard limit to 100 rows (no warning, just limits)new PrintPlugin({ maxRows: 100 })
// Warn at 500+ AND hard limit to 1000new PrintPlugin({ warnThreshold: 500, maxRows: 1000 })
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt