0.10.0 • Published 3 years ago

ra-data-processmaker3 v0.10.0

Weekly downloads
32
License
MIT
Repository
github
Last release
3 years ago

ra-data-processmaker3

Travis (.org) branch npm npm bundle size GitHub

React Admin ProcessMaker3 DataProvider

Installation

npm i --save query-string ra-data-processmaker3

Usage

// in src/App.tsx
import React from "react";
import { Admin, Resource } from "react-admin";
import pmProvider from "ra-data-processmaker3";

import { PostList } from "./posts";

const App = () => (
    <Admin dataProvider={pmProvider("http://path.to.my.api/")}>
        <Resource name="posts" list={PostList} />
    </Admin>
);

export default App;

Customizing Http Client

// in src/App.tsx
import { fetchUtils, Admin, Resource } from "react-admin";
import pmProvider from "ra-data-processmaker3";

const httpClient = (url, options = {}) => {
    if (!options.headers) {
        options.headers = new Headers({ Accept: "application/json" });
    }
    // add your own headers here
    options.headers.set("X-Custom-Header", "foobar");
    return fetchUtils.fetchJson(url, options);
};

const provider = pmProvider("http://path.to.my.api/", httpClient);

Contributors

License

This project is licensed under the MIT license.
Copyright (c) KoLiBer (koliberr136a1@gmail.com)

0.10.0

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.3.0

3 years ago

0.4.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago