Last active
June 1, 2023 18:02
-
-
Save NetanelBasal/60906b2f718dddf351b083a643bc49d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class CopyAction extends Action { | |
getLabel() { | |
return 'Copy'; | |
} | |
invoke() { | |
inject(CopyService).copy(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
standalone: true, | |
imports: [GridActionsComponent], | |
template: ` | |
<grid-actions [actions]="actions"></grid-actions> | |
` | |
}) | |
export class GridCellComponent { | |
actions = [new CopyAction()]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment