Wiktor Danielewski b49c86fda5
[AAE-16968] Add boolean type (#8972)
* [AAE-16968] Update variable mapper service

* Update DetaColumnComponent

* [AAE-16968] Update DataColumnTypes interface

* [AAE-16968] Handle boolean column on UI

* [AAE-16968] Create BooleanCellComponent

* [AAE-16968] Delete comment

* [AAE-16968] Update BooleanCellComponent

* [AAE-16968] Delete unnecessary css classes

* [AAE-16968] Allow for string values

* [AAE-16968] Update test for datatable

* [AAE-16968] Update tests for boolean cell

* [AAE-16968] Update tests for VariableMapperService

* [AAE-16968] Add boolean pipe

* [AAE-16968] Update pipe

* [AAE-16968] Update code formatting

* [AAE-16968] Add doc for the boolean pipe

* [AAE-16968] Update DataColumnComponent doc

* [AAE-16968] Delete unnecessary class

* [AAE-16968] Fix title bug

* [AAE-16968] Update BooleanCell tests

* [AAE-16968] Update Boolean pipe

* [AAE-16968] Update tests for variable mapper service

* [AAE-16968] Update PipesModule

* [AAE-16968] Small fix

* [AAE-16968] Fix lint error
2023-10-19 09:00:27 +02:00

27 lines
738 B
Markdown

---
Title: Boolean pipe
Added: v6.4.0
Status: Active
Last reviewed: 2023-10-12
---
# [Boolean pipe](../../../lib/core/src/lib/pipes/boolean.pipe.ts "Defined in boolean.pipe.ts")
Converts the received values to one of the possible strings: 'true', 'false' or ""(empty string).
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
Is available: {{ isAvailable | adfBoolean }}
</div>
```
<!-- {% endraw %} -->
## Details
This pipe is prepared for any input values. The value `'true'` will be returned if true (boolean) or 'true' (exact string) appears on the input. The situation is identical for the value `'false'` - it will be returned in the case of false(boolean) or 'false'. In other cases, we can expect an `empty string('')`.