2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-15 07:48:51 +00:00

feat: add copyable cells feature with CopyButton component (#11406)

This commit is contained in:
Tin Pham
2026-02-23 00:59:22 -08:00
committed by GitHub
parent 33c57887ad
commit edc639d55c
5 changed files with 77 additions and 2 deletions

View File

@@ -99,6 +99,8 @@ export type TableState = {
* @param cellsStyle - The style of the cells in the column
* @param extra - Extra data to pass to the render function
* @param noContext - Disable context menu for this column
* @param copyable - Enable copy button on hover (uses accessor to get value, or custom function)
* @param copyAccessor - Custom accessor path for copy value (defaults to column accessor)
*/
export type TableColumnProps<T = any> = {
accessor?: string;
@@ -123,6 +125,8 @@ export type TableColumnProps<T = any> = {
extra?: any;
noContext?: boolean;
style?: MantineStyleProp;
copyable?: boolean | ((record: T) => string);
copyAccessor?: string;
};
/**