Cell Tooltips and Popovers
Display tooltips and expandable content for spreadsheet cells
Overview
Cell Tooltips
Basic Usage
import { SpreadsheetProvider, CanvasGrid } from "@rowsncolumns/spreadsheet";
function SpreadsheetWithTooltips() {
const getTooltipContent = (
sheetId: number,
rowIndex: number,
columnIndex: number
) => {
// Return undefined for no tooltip
if (rowIndex === 0 || columnIndex === 0) {
return undefined;
}
// Return JSX for custom tooltip
return (
<div className="p-2">
<strong>Cell:</strong> {cellToAddress({ rowIndex, columnIndex })}
<br />
<strong>Sheet:</strong> {sheetId}
</div>
);
};
return (
<SpreadsheetProvider>
<CanvasGrid
sheetId={1}
getTooltipContent={getTooltipContent}
// ... other props
/>
</SpreadsheetProvider>
);
}Function Signature
Return Values
Examples
Display Cell Metadata
Show Validation Rules
Display Error Messages
Expandable Cell Content
Basic Usage
Function Signature
Advanced Examples
Rich Text Editor
Image Gallery
Interactive Form
Data Visualization
Cell-Specific Content
Complete Example
Styling
Tooltip Styling
Popover Styling
Use Cases
Data Annotations
Error Explanations
Rich Content Preview
Interactive Dialogs
Audit Information
Performance Considerations
Best Practices
Troubleshooting
Tooltips Not Showing
Popovers Not Opening
Performance Issues
Last updated