@slickgrid-universal/odata
TypeScript icon, indicating that this package has built-in type declarations

4.6.1 • Public • Published

License: MIT TypeScript lerna--lite npm npm

Actions Status Cypress.io jest codecov

Grid OData Service

@slickgrid-universal/odata

OData Service to sync a grid with an OData backend server, the service will consider any Filter/Sort and automatically build the necessary OData query string that is sent to your OData backend server.

Internal Dependencies

External Dependencies

No external dependency

Installation

Follow the instruction provided in the main README, you can see a demo by looking at the GitHub Demo page.

Usage

Simply use pass the Service into the backendServiceApi Grid Option.

ViewModel
import { GridOdataService, OdataServiceApi } from '@slickgrid-universal/odata';

export class MyExample {
  initializeGrid {
    this.gridOptions = {
      backendServiceApi: {
        service: new GridOdataService(),
        options: {
          version: 4 // OData v2 or v4
        },
        preProcess: () => this.displaySpinner(true),
        process: (query) => this.getCustomerApiCall(query),
        postProcess: (response) => {
          this.displaySpinner(false);
          this.getCustomerCallback(response);
        }
      } as OdataServiceApi
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @slickgrid-universal/odata

Weekly Downloads

152

Version

4.6.1

License

MIT

Unpacked Size

301 kB

Total Files

60

Last publish

Collaborators

  • ghiscoding