Releases: e-oz/ngx-collection
Releases · e-oz/ngx-collection
3.1.0
- New method to replace previously removed
postInit()
:asyncInit()
. Will be called in the next microtask from the constructor (init()
will be called first). Collection.constructor()
will complain in dev mode, if the comparator has to use default id fields, because no custom id fields are provided and no custom comparator is provided - that's exactly whyCollection
is not@Injectable
anymore: providing this information is critically important for the correct functioning ofCollection
, so comparator fields (or a custom comparator) should be set explicitly. This error will help you not forget about it but will not pollute the console in production mode.
3.0.1
3.0.0
Breaking changes:
- Observable-based version removed;
CollectionCore
renamed toCollectionInterface
;- Fields, containing signals now prefixed with '$' (
$items
,$totalCountFetched
,$isUpdating
and so on); - Methods don't accept observables anymore:
-
isItemDeleting()
-
isItemRefreshing()
-
isItemUpdating()
-
isItemMutating()
-
isItemProcessing()
Collection
class is not@Injectable
anymore. Easiest way to create an injectable class is to extendCollection
with an@Injectable
class;NGX_COLLECTION_OPTIONS
token removed - set options usingconstructor()
orsetOptions()
;- Default value for
onDuplicateErrCallbackParam
changed from{status: 409}
toDuplicateError
object; postInit()
method removed - you can declare your own and call it asPromise.resolve().then(() => this.postInit());
frominit()
if needed;CollectionManager
merged back toCollection
.
2.3.2
2.3.1
2.3.0
- New methods, for both versions:
listenForItemsUpdate()
,listenForItemsDeletion()
; - Methods
isItemDeleting()
,isItemRefreshing()
,isItemUpdating()
,isItemMutating()
,isItemProcessing()
now acceptPartial<T>
as an argument...; - ...and implemented in the observable-based version. They return signals there as well to have the same API. To get the same result using observables only, you can use
hasItemIn()
method.
2.2.1
2.2.0
- Signal-based Collection!
- API documentation moved to the interfaces.
2.1.2
toObservable()
from '@angular/core/rxjs-interop' will be used without replacement;- If instantiated not in an injection context and without
injector
argument, theconstructor()
will throw an error in development mode or will print toconsole.error
(orerrorReporter
, if set), at runtime.