Mentions
Add @mentions functionality to spreadsheet cells
Overview
Basic Usage
import { SpreadsheetProvider, CanvasGrid } from "@rowsncolumns/spreadsheet";
import { useCallback } from "react";
function SpreadsheetWithMentions() {
const getMentions = useCallback(async (query?: string) => {
// Fetch mentions from your API or database
return [
{ label: "John Doe", value: "user-123" },
{ label: "Jane Smith", value: "user-456" },
{ label: "Marketing Team", value: "team-789" },
];
}, []);
return (
<SpreadsheetProvider>
<CanvasGrid
sheetId={1}
getMentions={getMentions}
// ... other props
/>
</SpreadsheetProvider>
);
}getMentions Function
Function Signature
Parameters
Example with Search
Custom Dropdown Rendering
MentionDropdownItemComponent Props
Async Data Loading
Complete Example
Accessing Mention Data
Use Cases
Team Collaboration
Project Management
Comments and Notes
Styling
Performance Optimization
Debounced Search
Caching
Best Practices
Troubleshooting
Mentions Not Appearing
Search Not Working
Slow Performance
Last updated