techniq / react-odata Goto Github PK
View Code? Open in Web Editor NEWReact component to declaratively fetch from OData v4 endpoints
License: MIT License
React component to declaratively fetch from OData v4 endpoints
License: MIT License
My filter query is getting too long in the url and throwing an error. How can I use batch processing in the current format? Are there other ways to get around?
Any examples would help.
I'm trying to construct the simplest of samples just to see if I can use react-odata in my app. For some reason the list doesn't get built. The odata service is working, I can get data by entering the url in the browser and it's working in other apps I've made in ionic and other frameworks.
import React, { Component } from 'react';
import {
Text,
View,
ScrollView
} from 'react-native';
import { List, ListItem } from 'react-native-elements';
import OData from 'react-odata';const baseUrl = 'http://ODATAURL/odata/Products';
const query = false;
<OData baseUrl={baseUrl} query={query}>
{({ loading, error, data }) => (
<View style={{ height: 400 }}>
<Text>HI THERE!</Text>
{loading && <Text>Loading...</Text>}
{error && <Text>error...</Text>}
{data &&
<List>
{data.map((product) => (
<ListItem
key={product.ProductId}
title={`${product.ItemCode}`}
/>
))}
</List>
}
</View>
)}
</OData>
I see the text that says HI THERE. But nothing else. I even tried putting in some sample list items but they didn't show up either. Can somebody help out with this? Is this the right way to handle the return data? Would is be possible for someone to add an example to the repo?
Thanks,
Mike
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.