Coder Social home page Coder Social logo

aymendhaya / ra-data-firebase-client Goto Github PK

View Code? Open in Web Editor NEW
53.0 7.0 51.0 11.18 MB

firebase data provider for react-admin framework

Home Page: https://aymendhaya.github.io/ra-data-firebase-client

JavaScript 96.50% HTML 3.50%
react-admin firebase

ra-data-firebase-client's People

Contributors

aymendhaya avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ra-data-firebase-client's Issues

Show Child listing

Hello
i want to show listing inside of main route..i am not finding a way to do so using firebase client or may be react admin ..
Like.. users - specific user -> Feedbacks listing
I m not able to list feedbacks listing on edit user .. feedbacks is not stored separate so i cant use referenceinput or reference fields

Project still being developed?

No updates for over 2 years. Is this project still being developed?

I’ve been struggling with getting it to work with the latest versions of React Admin and Firebase. I was going to post my findings here if anybody is interested.

run error

when i run the script i get this error :
Module not found: Can't resolve 'sort-by'

Can't upload image

I'm using the forked firestore version of this and when I try to use the image component to upload an image I get the following error:

DocumentReference.set() called with invalid data. Unsupported field value: a custom File object (found in field pictures.rawFile)

This is my component:

<ImageInput source="pictures" label="Slide picture" accept="image/*">
  <ImageField source="src" title="title" />
</ImageInput>

Unwanted console.log()

Can we lose this, please?

        console.log('reselut', result);

It's in src/lib/RestProvider.js, line 151.

Timedelay in Update and Delete Command

Hello,

I love your boilerplate and using it for a project but there is a critical problem ( at least from user experience point of view ). After you update or delete the record it takes few seconds to reach out to this line. I tried debugging but could not found much.

/src/lib/RestProvider.js
181: console.log('UPDATE/CREATE');

Have you seen this issue before ?

sign_in_error

I used your demo as a template to create my own app but all I keep getting is sign_in_error.
Are there some steps that I'm not doing or am I doing something wrong?

It seems to understand that the user exists with a certain email/pass but then it just errors.

import React from 'react';
import { Admin, Resource } from 'react-admin';
import Dashboard from './components/dashboard/dashboard';
import { RestProvider, AuthProvider, base64Uploader } from 'ra-data-firebase-client';

import { UserList } from './components/users/users';
import { PostList, PostEdit, PostCreate } from './components/posts/posts'

import UserIcon from '@material-ui/icons/Group';
import PostIcon from '@material-ui/icons/Book';

const firebaseConfig = {
  apiKey: "",
  authDomain: "",
  databaseURL: "",
  projectId: "",
  storageBucket: "",
  messagingSenderId: ""
};
const trackedResources = [{ name: 'posts', isPublic: true }, { name: 'users', isPublic: true }];

const authConfig = {
  userProfilePath: '/users/',
  userAdminProp: 'isAdmin'
};

const dataProvider = base64Uploader(RestProvider(firebaseConfig, {trackedResources}));
const App = () => (
  <Admin dashboard={Dashboard} dataProvider={dataProvider} authProvider={AuthProvider(authConfig)}>
    <Resource name="users" list={UserList} icon={UserIcon} />
    <Resource name="posts" list={PostList} edit={PostEdit} create={PostCreate} icon={PostIcon} />
  </Admin>
);

export default App;

I have this issue

./node_modules/ra-data-firebase-client/dist/index.es.js

Module not found: Can't resolve 'sort-by' in '/Users/PATH/node_modules/ra-data-firebase-client/dist'

No result with ReferenceArrayField

I would like to display a list of users.
So, in the database I get something like this :

"users": {
  "user1": true,
  "user2": true,
  "user3": true,
}

How can I display each users from a post resource ?
I'm try using ReferenceArrayField but doesn't works.

AuthProvider does not work with Firestore

I have added a new user with the credentials from auth, however, there is sign_in_error that comes out.

Is it right for me to say that it does not work for firestore as of the moment? Thank you!

ReferenceArrayField doesn't work

import React from 'react';
import { List, ReferenceArrayField, SingleFieldList, TextField, ChipField, Datagrid } from 'react-admin';

export const Orders = props => (
  <List {...props}>
    <Datagrid>
      <TextField label="State" source="state" />
      <ReferenceArrayField label="Products" reference="orderItem" source="items">
        <SingleFieldList>
          <ChipField source="price" />
        </SingleFieldList>
      </ReferenceArrayField>
    </Datagrid>
  </List>
);

I have this piece of code and returns me an error. I'm struggling with this for a long time. What I did wrong? It is a bug?

Screenshot 2019-10-17 at 23 35 49

Screenshot 2019-10-17 at 23 36 11

Screenshot 2019-10-17 at 23 35 07

DateTimeInput values cannot be saved

DateInput works fine but DateTimeInput cannot be saved, the field is missing in firebase.

If there's a pre-defined field, it will be removed.

The Posts in the example can be used for reproduction.

Automatically refresh token

Hello,

Firebase token seems to expire every 1 hour.

This causes problems when there are actions to be made, is there a way to automatically refresh the token in the background before the hour expires? Or some other solution?

We want the logged-in user to remain logged-in until they choose to logout.

Thanks.

P.S. Similar discussion here (for Android apps though):
https://stackoverflow.com/questions/38350843/how-to-handle-custom-firebase-token-expiry-in-firebase-3-x-x
P.S. Using react-admin v2.6.1

ImageInputs does not work inside ArrayField

If I place ImageInput inside ArrayField:

<ArrayInput source="subBlocks">
  <SimpleFormIterator>
    <ImageInput source="images" label="Image" accept="image/*" multiple>
      <ImageField source="src" title="title" />
    </ImageInput>
  </SimpleFormIterator>
</ArrayInput>```

The image url brokes. It does not looks like base-64 image and looks like "blob:http://localhost:8080/c7956ca5-9c1b-44c1-a001-d84b90e4d4b0" and stores locally.

How will you use filter and how will you show a particular user

const trackedResources = [{ name: 'users', isPublic: true }];

// to run this demo locally, please feel free to disable authProvider to bypass login page

const dataProvider = base64Uploader(RestProvider(firebaseConfig, { trackedResources }));
const App = () => (
<Admin dataProvider={dataProvider}>

<Resource name="users" list={UserList} show={UserShow} edit={UserEdit} create={UserCreate} />

</Admin>
);

show seems not to be working? I expected that when you click on a row of the User List, it is supposed
to show the user details.

Secondly, i try implementing the filter component, but i am unable to search and filter records

const UserFilter = props => (

<Filter {...props}>
<TextInput label="Search" source="Name" alwaysOn />
</Filter>

);

export const UserList = props => (

<List title="All Users" {...props} filters={<UserFilter />}>
<Datagrid rowClick="show">
<TextField source="id" />
<TextField source="Name" />
<TextField source="Car.Brand" label="Car" />
<EditButton />
</Datagrid>
</List>

);

I'd like to know what the possible problem is

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.