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:
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user