[ACS-9012] Add the option to truncate display value in text column (#10440)

* [ACS-9012] Add the option to truncate disaplay value in text column

* [ACS-9012] Use slice as substr is deprecated

* [ACS-9012] Remove redundant param
This commit is contained in:
MichalKinas
2024-12-05 09:55:24 +01:00
committed by GitHub
parent 88eb654c30
commit 60a9565c71
11 changed files with 182 additions and 20 deletions

View File

@@ -0,0 +1,27 @@
---
Title: Truncate pipe
Added: v7.0.0-alpha.7
Status: Active
Last reviewed: 2024-11-28
---
# Truncate Pipe
Truncates the text when it exceeds specified max length. It also appends provided ellipsis at the end of the string.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
{{ textToTruncate | truncate:100:'***' }}
</div>
```
<!-- {% endraw %} -->
| Name | Type | Default value | Description |
| ------------- | -------- | ------------- | ---------------------------------------------------------------------- |
| maxTextLength | `number` | 250 | Max length of the text that should be displayed prio to truncating. |
| ellipsis | `string` | `...` | String which will be appended to the text when truncating will happen. |