almahdi / ra-data-parse Goto Github PK
View Code? Open in Web Editor NEWParse Client for React Admin
License: MIT License
Parse Client for React Admin
License: MIT License
I have a object called Post and an object called Comment in parse database. Comment have a reference field call Post point to Post object. I use ListGuesser :
<Resource name="Comment" list={ListGuesser} />
Got this in browser console:
export const CommentList = props => (
<List {...props}>
<Datagrid rowClick="edit">
<TextField source="id" />
<DateField source="createdAt" />
<DateField source="updatedAt" />
<TextField source="content" />
<NumberField source="likes" />
<TextField source="owner" />
<TextField source="post.className" />
</Datagrid>
</List>
);
It shows the post field in Comment as a TextField. Apparently it's not true. How can I get the reference object and show a link? Thanks.
import React from 'react';
import { List, Datagrid, ReferenceField,Edit,SimpleForm,ReferenceInput,SelectInput,TextInput, TextField } from 'react-admin';
export const test = (props) => (
<List {...props}>
<Datagrid rowClick="edit">
<TextField source="id" />
<TextField source="name" />
<ReferenceField label="Gender" source="gender.id" reference="Gender">
<TextField source="gender" />
</ReferenceField>
</Datagrid>
</List>
);
export const testEdit = (props) => (
<Edit {...props}>
<SimpleForm>
<TextInput source="name"/>
<ReferenceInput source="gender.id" reference="Gender">
<SelectInput optionText="gender" />
</ReferenceInput>
</SimpleForm>
</Edit>
);
ParseError: 111 schema mismatch for test.gender; expected Pointer but got Object
other try(case) for testEdit
export const testEdit = (props) => (
<Edit {...props}>
<SimpleForm>
<TextInput source="name" />
<ReferenceInput source="gender" reference="Gender">
<SelectInput optionText="gender" />
</ReferenceInput>
</SimpleForm>
</Edit>
);
Error: schema mismatch for test.gender; expected Pointer but got String
Hi,
Thank you for your hard work. I am having a problem with many-to-many relationships.
Best regards,
Fahad.
Hello,
I'm new in web development and I can't find how to map my classes (which are in my parse REST API) with react admin thought this data provider. Can you provide an exemple (for exemple in the readme) to fetch, read and edit classes from Parse ?
Thanks
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.