Skip to content

Lot of Backend Event Service refactoring

Compare
Choose a tag to compare
@ghiscoding ghiscoding released this 26 Jan 01:26
· 4129 commits to master since this release

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 the backendServiceApi
    • a new option flag executeProcessCommandOnInit (only GraphQL for now) was added and if set to true will make the onInit irrelevant (though it still exist and available). This new flag when set to True will run the process callback on page load (component init).
    • another option flag addLocaleIntoQuery was added to deal with GraphQL filterBy and orderBy with translated values.
    • made filterTypingDebounce optional, default to 750ms
    • made GraphQL postProcess totally optional, the service now use an internalPostProcess 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 by backendServiceApi, you can still use previous implementation but you will get a warning in the console.
  • new Column option queryField was added so that you can use another field to do an orderBy or filterBy (this works with all implementation, regular grid with JSON dataset and/or backend services OData/GraphQL)
  • Inline Editor dateEditor will now translate automatically by using ngx-translate currentLang to use proper locale with Flatpickr.
  • renamed Event Emitter onGridDestroyed to onAfterGridDestroyed to be more consistent with the others.

Fixes

  • fixed issue #8 when using inline editor dateEditor and latest Flatpickr 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.

Deprecated

  • onBackendEventApi was deprecated, please use the much simpler backendServiceApi 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.