Skip to content

Commit 7fc1bac

Browse files
committed
prepared 2.0.1
1 parent 316dce9 commit 7fc1bac

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
### 2.0.1
4+
* [[#54](https://github.com/VadimDez/ngx-order-pipe/pull/54)] - multiple fields sorting
5+
* [[#14](https://github.com/VadimDez/ngx-order-pipe/issues/14)] - Multi Ordering
6+
7+
### Feature
8+
Expression now accepts `string` as well as `array of strings` to perform multi order.
9+
10+
Example, order by `name` and `age`:
11+
```html
12+
<div *ngFor="let item of items | orderBy: ['name', 'age']">
13+
{{ item | json }}
14+
</div>
15+
```
16+
17+
318
### 2.0.0
419
#### Breaking changes
520
* [[#52](https://github.com/VadimDez/ngx-order-pipe/issues/52)] - Value passed to transform() should not be modified.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ In case you're using `systemjs` - see configuration [here](https://github.com/Va
3636
| Param | Type | Default | Details |
3737
| --- | --- | --- | --- |
3838
| collection | `array` or `object` | | The collection or object to sort |
39-
| expression | `string array` or `string` | | The collection of keys or key to determinate order |
39+
| expression | `string` or `string array` | | The key or collection of keys to determinate order |
4040
| reverse *(optional)* | `boolean`| false | Reverse sorting order |
4141
| caseInsensitive *(optional)* | `boolean`| false | Case insensitive compare for sorting |
4242
| comparator *(optional)* | `Function`| | Custom comparator function to determine order of value pairs. Example: `(a, b) => { return a > b ? 1 : -1; }` [`See how to use comparator`](https://github.com/VadimDez/ngx-order-pipe/issues/39) |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-order-pipe",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Angular order pipe, order collection by a field",
55
"scripts": {
66
"ng": "ng",

0 commit comments

Comments
 (0)