Releases: e-oz/ngx-collection
Releases · e-oz/ngx-collection
v1.2.5
v1.2.1
v1.2.0
- New (additional) methods:
createMany()
refreshMany()
updateMany()
deleteMany()
request
parameter will now accept an array of requests (toforkJoin()
them) in:createMany()
readMany()
refreshMany()
updateMany()
deleteMany()
Requests with suffix*many
will run in parallel (usingforkJoin()
). If you need to run them differently, you can use regular methods with the creation operator of your choice.
- A function can be used as a value for the
comparator
field in configuration options or as an argument forsetComparator()
method; - New method for override:
postInit()
- will be called in the next microtask afterconstructor()
.
You can override and use it to call the methods declared in the subclass and still don't bother aboutconstructor()
overriding; getTrackByFieldFn()
helper will not use fields with empty values;- Jest has been configured to run tests in this repo - pull requests are welcome!
v1.1.1
v1.1.0
onDuplicateErrCallbackParam
added to configuration options.- type restriction for
item
parameter is relaxed to Partial. It was possible to use partial objects before, but it was not obvious from signatures. - New methods
readOne()
,readMany()
,getItem()
,getItemByField()
have been added and documented. - Removed synchronous check from
setUniqueStatus()
whenactive = false
. It was the only synchronous call in code.
v1.0.10
v1.0.9
You can (optionally) declare Collection Service configuration details in your module or component providers:
providers: [
{
provide: 'COLLECTION_SERVICE_OPTIONS',
useValue: {
allowFetchedDuplicates: environment.production,
}
},
]
Token COLLECTION_SERVICE_OPTIONS
is just a string to don't break lazy-loading (if you are using it).
Options structure:
interface CollectionServiceOptions {
comparatorFields?: string[];
throwOnDuplicates?: string;
allowFetchedDuplicates?: boolean; // if not set: true
}