Ecodev / natural

Angular Material components and various utilities

Home Page:https://ecodev.github.io/natural

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor column picker typing

PowerKiKi opened this issue · comments

Refactor as described below for easier usage. Because the only non-ES2020 project is Dilps and we don't use ColumnPicker there.

* Implementation details:
*
* Unfortunately, we cannot use a `Record<AvailableColumn>` where keys would implicitly be unique and would replace
* this ID property, because only ES2020 guarantee the order of object keys, and we must still support ES2015 for
* iPhone 6. So, instead of `Record<AvailableColumn>`, we use `AvailableColumn[]` for now. But this could be
* revisited once we drop support of ES2015.
*
* @see https://stackoverflow.com/questions/30076219/does-es6-introduce-a-well-defined-order-of-enumeration-for-object-properties