Open sagar-jani opened 2 weeks ago
I have actions in data-table - copy, I want to show different icon to user when user clicked on the action. However i can't define any state inside columns.
Here is what I want to do
const copyToClipboard = async () => { try { await navigator.clipboard.writeText(loan.accountno); setIsCopied(true); setTimeout(() => setIsCopied(false), 2000); } catch (err) { console.error('Failed to copy text: ', err); } }; <DropdownMenuItem className="cursor-pointer" onClick={copyToClipboard}> {isCopied ? ( <CopyCheckIcon className="h-4 w-4" /> ) : ( <CopyIcon className="h-4 w-4" /> )} Copy </DropdownMenuItem>
No response
Additional details here...
Feature description
I have actions in data-table - copy, I want to show different icon to user when user clicked on the action. However i can't define any state inside columns.
Here is what I want to do
Affected component/components
No response
Additional Context
Additional details here...
Before submitting