Skip to content

Commit 5f82411

Browse files
authored
docs(AnalyticalTable): add and improve prop notes (#8258)
1 parent 39433d4 commit 5f82411

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/main/src/components/AnalyticalTable/AnalyticalTable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const TableComp = () => {
104104
| `headerTooltip` | `string` | Tooltip for the column header. If not set, the display text will be the same as the Header if it is a `string` |
105105
| `Cell` | `string` OR<br />`ComponentType`<br/>`<CellInstance>` | Custom cell renderer. If set, the table will use this component or render the provided string for every cell, passing all necessary information as props, e.g., the cell value as `props.value`.<br /><br />**Note:**<ul><li>Using a custom component **can impact performance**! If you pass a component, **memoizing it is strongly recommended**, especially for complex components or large datasets.</li><li>For custom elements, text truncation needs to be applied manually. [Here](https://ui5.github.io/webcomponents-react/v2/?path=/docs/data-display-analyticaltable-recipes--docs) you can find out more.</li></ul> |
106106
| `cellLabel` | `({cell, instance})`<br/>`=> string` | Defines a function that receives an object as a parameter, including the cell and table instance, and should return the `aria-label` of the current cell. <br /><br />**Note:** Use this property if there is no textual content available through the dataset (e.g. no `accessor` field available), or if you want to provide additional context when navigating to the respective cell for screen readers.<br /><br />**Note:** To retrieve the internal `aria-label`, utilize the `cell.cellLabel` property. |
107-
| `width` | `number` | Defines the column width. If not set, the table will distribute all columns without a width evenly.<br />**Note:** Values lower than `minWidth` are not supported! |
107+
| `width` | `number` | Defines the column width. If not set, the table will distribute all columns without a width evenly.<br />**Note:** The `width` cannot be less than `minWidth`. Since `minWidth` defaults to 60, set a lower `minWidth` to allow narrower columns. |
108108
| `minWidth` | `number` | Minimum width of the column.<br />**Default:** `60` |
109109
| `maxWidth` | `number` | Maximum width of the column. |
110110
| `Filter` | `ComponentType` | Filter Component to be rendered in the Header |

packages/main/src/components/AnalyticalTable/types/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ export interface AnalyticalTableColumnDefinition {
472472
/**
473473
* Defines the column width. If not set the table will distribute all columns without a width evenly.
474474
*
475-
* __Note:__ Values lower than `minWidth` are not supported!
475+
* __Note:__ The `width` cannot be less than `minWidth`. Since `minWidth` defaults to 60, set a lower `minWidth` to allow narrower columns.
476476
*/
477477
width?: number;
478478
/**
@@ -822,6 +822,8 @@ export interface AnalyticalTablePropTypes extends Omit<CommonProps, 'title'> {
822822
withNavigationHighlight?: boolean;
823823
/**
824824
* Flag whether the table should add an extra column at the start of the rows for displaying row highlights, based on the `highlightField` prop.
825+
*
826+
* __Note:__ When enabled, the table automatically adds a column with `accessor="status"`. If you have a custom column using this accessor, change the `highlightField` prop to a different value to avoid conflicts.
825827
*/
826828
withRowHighlight?: boolean;
827829
/**

0 commit comments

Comments
 (0)