@@ -2,11 +2,17 @@ import { useCallback, useMemo, useRef, useState } from 'react';
22import { AnalyticalTableSelectionMode } from '../../../enums/AnalyticalTableSelectionMode.js' ;
33import { AnalyticalTableSubComponentsBehavior } from '../../../enums/AnalyticalTableSubComponentsBehavior.js' ;
44import { Button } from '../../../webComponents/Button/index.js' ;
5+ import { Link } from '../../../webComponents/Link/index.js' ;
56import { Panel } from '../../../webComponents/Panel/index.js' ;
67import { Tab } from '../../../webComponents/Tab/index.js' ;
78import { TabContainer } from '../../../webComponents/TabContainer/index.js' ;
89import { AnalyticalTable } from '../index.js' ;
9- import type { AnalyticalTableColumnDefinition , AnalyticalTableInstance , AnalyticalTablePropTypes } from '../index.js' ;
10+ import type {
11+ AnalyticalTableCellInstance ,
12+ AnalyticalTableColumnDefinition ,
13+ AnalyticalTableInstance ,
14+ AnalyticalTablePropTypes ,
15+ } from '../index.js' ;
1016import * as AnalyticalTableHooks from '../pluginHooks/AnalyticalTableHooks.js' ;
1117import type {
1218 AnalyticalTableStickyAutoToggleDetail ,
@@ -380,3 +386,24 @@ export const LoadingPlaceholderHarness = (props: Partial<AnalyticalTablePropType
380386 { ...props }
381387 />
382388) ;
389+
390+ const LinkCell = ( props : AnalyticalTableCellInstance ) => {
391+ const callbackRef = AnalyticalTableHooks . useF2CellEdit . useCallbackRef ( props ) ;
392+ return (
393+ < Link href = "#review" ref = { callbackRef } >
394+ { props . value }
395+ </ Link >
396+ ) ;
397+ } ;
398+
399+ const f2Columns : AnalyticalTableColumnDefinition [ ] = [
400+ // Interactive column without a `cellLabel` — the hook builds the cell `aria-label` from `interactiveElementName`.
401+ { Header : 'Title' , accessor : 'title' , Cell : LinkCell , interactiveElementName : 'Link' } ,
402+ // Plain column with neither `interactiveElementName` nor `cellLabel` — must keep its `aria-labelledby`.
403+ { Header : 'Status' , accessor : 'status' } ,
404+ ] ;
405+
406+ const f2Data = [ { title : 'Annual Review' , status : 'open' } ] ;
407+ const f2TableHooks = [ AnalyticalTableHooks . useF2CellEdit ] ;
408+
409+ export const F2CellEditHarness = ( ) => < AnalyticalTable columns = { f2Columns } data = { f2Data } tableHooks = { f2TableHooks } /> ;
0 commit comments