Lot of Backend Event Service refactoring
New Features
- rewrote the entire Backend Service implementation to make it much simpler to use
- you no longer need to call
initOptions
separately to define service options, you can now do that directly in thebackendServiceApi
- a new option flag
executeProcessCommandOnInit
(only GraphQL for now) was added and if set to true will make theonInit
irrelevant (though it still exist and available). This new flag when set to True will run theprocess
callback on page load (component init). - another option flag
addLocaleIntoQuery
was added to deal with GraphQLfilterBy
andorderBy
with translated values. - made
filterTypingDebounce
optional, default to 750ms - made GraphQL
postProcess
totally optional, the service now use aninternalPostProcess
that will takes care of filling the slickgrid dataset and pagination info (prior to this change, you had to manually deal with them).postProcess
is still available and you can still use it to stop a spinner or anything after the process is done. onBackendEventApi
is deprecated is replaced bybackendServiceApi
, you can still use previous implementation but you will get a warning in the console.
- you no longer need to call
- new Column option
queryField
was added so that you can use another field to do anorderBy
orfilterBy
(this works with all implementation, regular grid with JSON dataset and/or backend services OData/GraphQL) - Inline Editor
dateEditor
will now translate automatically by usingngx-translate currentLang
to use proper locale with Flatpickr. - renamed Event Emitter
onGridDestroyed
toonAfterGridDestroyed
to be more consistent with the others.
Fixes
- fixed issue #8 when using inline editor
dateEditor
and latestFlatpickr
version - fixed issue #9 string filter should be case insensitive
- fixed string filter with (*) operator on filter, the filtering query was inverse
John*
=> startsWith,*Doe
=> endsWith
- fixed, yet again, an error thrown by SlickGrid saying: "Stylesheet missing"
- Backend Service Pagination
- changing the page size in the UI was returning a string to
pageSize
and was breaking the pagination - changing page then typing a filter was not reseting the GraphQL offset property which would sometime break pagination since we could be out of bound.
- changing the page size in the UI was returning a string to
Deprecated
onBackendEventApi
was deprecated, please use the much simplerbackendServiceApi
instead. You will receive a warning in the console when using previous property. Please refer to the OData Wiki or the GraphQL Wiki for more info on the new property usage.