diff --git a/_data/components/otableData/renderers/03tableColumnRendererCurrency.yml b/_data/components/otableData/renderers/03tableColumnRendererCurrency.yml index 320c37708..ba4cbfbd7 100644 --- a/_data/components/otableData/renderers/03tableColumnRendererCurrency.yml +++ b/_data/components/otableData/renderers/03tableColumnRendererCurrency.yml @@ -26,6 +26,11 @@ attributes: [{ name: "min-decimal-digits" },{ name: "max-decimal-digits" +},{ + name: "currency-symbol-column", + type: "string", + default: "$", + description: "Column name containing the currency symbol for each row. Supports nested properties using dot notation (e.g., 'currency.symbol')" }] inherit_properties: [{ diff --git a/docs/components/data/35-o-table.component.md b/docs/components/data/35-o-table.component.md index cbf86ffe6..bc96f5a74 100644 --- a/docs/components/data/35-o-table.component.md +++ b/docs/components/data/35-o-table.component.md @@ -488,11 +488,48 @@ Include the table cell renderer currency in your table column by configuring the - + ``` +Also you can configure different currency symbols for each row by using the `currency-symbol-column` attribute. This attribute specifies the column name in your data that contains the currency symbol for each row. + +```html + + + + + + + +``` + +The `currency-symbol-column` attribute supports nested properties using dot notation: + +```html + +``` + +**Example data structure:** +```javascript +{ + BALANCE: 1500.50, + currencyCode: "€" +} + +// Or with nested properties: +{ + BALANCE: 1500.50, + currency: { + symbol: "€", + code: "EUR" + } +} +``` + +> **Note:** When `currency-symbol-column` is specified, it takes precedence over the `currency-symbol` attribute for each row where the column value is available. + **Date cell renderer** You can include the table cell renderer date in your table column by configuring the attribute `type` in the column with the value **date** or adding the `o-table-cell-renderer-date` to the table column. You may want to set the displaying date format by configuring the `format` attribute. Check this and other attributes in the **API** section of this page.