diff --git a/README.md b/README.md index 0da03b3..233f659 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ npm i @plcmp/pl-table ```html - - + + @@ -74,7 +74,7 @@ Main public properties: - `header: string` - header label - `field: string` - row field path (supports dot notation) -- `tooltipField: string` - tooltip field path for cell hover +- `tooltipField: string` - tooltip field path for cell hover; when `tooltip-field` is present without a value, column `field` is used - `kind: string` - value kind (`date` supported) - `format: string` - date format when `kind="date"` - `width: number` - column width in pixels @@ -94,17 +94,27 @@ Tooltips are owned by each column and shown on cell hover (`mouseenter`). ### Option 1: `tooltip-field` (recommended) -Use a plain field path for tooltip text: +Use `tooltip-field` as a boolean attribute when tooltip text should come from the column `field`: ```html + tooltip-field> ``` -Use this when tooltip text is the same as, or directly derived from, row data. +If tooltip text must come from a different path, provide it explicitly: + +```html + + +``` + +Use this option when tooltip text is the same as, or directly derived from, row data. ### Option 2: custom tooltip template