Git Product home page Git Product logo

ra-compact-ui's Introduction

ra-compact-ui

Enhanced styling components for popular framework react-admin.

No extra dependencies are required except the ones react-admin is already using.

Why use?

  • reduces styling boilerplate code
  • eases layout customizations
  • maintains native usage of built-in react-admin components

npm version npm downloads GitHub license PRs Welcome minzipped size styled with prettier

Actively maintained and developed with monthly releases!

Installation

Available as a npm package. You can install it using:

npm install ra-compact-ui
#or
yarn add ra-compact-ui

Run the Demo

npm run start-demo
#or
yarn start-demo

Table of Contents

Show View

Create & Edit View

Examples

Show View Components

Layouts

Layout components which allow building custom Show Layouts using unlimited nesting of material-ui's Box or Grid components while maintaining native use of all of the react-admin field-related components. Each layout can be used inside the Show component as well as inside the TabbedShowLayout's Tab component.

Important - In order for the layouts to work properly you should use the provided wrappers of material-ui's layout components named relatively - RaBox and RaGrid. They receive and pass all the props provided by the material-ui's api directly.


BoxedShowLayout

Utilizes material-ui's Box component wrapped inside RaBox and provides easy access to common css and flex-box properties.

<BoxedShowLayout>
    <RaBox display="flex" >
        <RaBox display="flex" flexWrap="wrap" flexGrow={4} sx={{
            paddingRight: "50px",
            borderRight: "solid thin",
            marginRight: "50px"}}>
            <RaBox flex="0 0 100%" display="flex" justifyContent="space-between">
                <ReferenceField label="Client Name" source="clientId" reference="clients">
                    <TextField source="name" />
                </ReferenceField>
                <ChipField source="progressStatus" label="Progress Status" />
                <TextField source="priority" />
            </RaBox>
            <RaBox flex="0 0 100%" display="flex" justifyContent="space-between">
                <DateField source="startDate" />
                <TextField source="timeElapsed" />
                <DateField source="deadline" />
            </RaBox>
        </RaBox>
        <RaBox display="inline-flex" flexDirection="column" flexGrow={1}>
            <ReferenceField label="Project Manager" source="managerId" reference="staff">
                <UserChipField source="fullName"  />
            </ReferenceField>
            <ReferenceField label="Product Owner" source="productOwnerId" reference="staff">
                <UserChipField source="fullName"  />
            </ReferenceField>
            <ReferenceField label="Marketing Specialist" source="marketingSpecialistId" reference="staff">
                <UserChipField source="fullName"  />
            </ReferenceField>
        </RaBox>
    </RaBox>
    <RaBox flex="0 0 100%" display="flex" mt="20px">
        <ArrayField source="activityRecords">
            <Datagrid>
                <DateField source="date" />
                <TextField source="description" />
                <TextField source="memberNames" />
            </Datagrid>
        </ArrayField>
    </RaBox>
</BoxedShowLayout>

image


GridShowLayout

Utilizes material-ui's Grid component wrapped inside RaGrid. Useful for aligning fields into rows and columns, as well as for making layout sections responsive.

Usage is absolutely analogous to the BoxShowLayout.


CompactShowLayout

This layout is a more generic version allowing you to pass your own layout building blocks (components). It serves also as the base component wrapped by the above ones.

Pass to layoutComponents prop an array which specifies the used layout components to be escaped as non-field components while rendering.

Important - All layout components should have a specified displayName.

<CompactShowLayout layoutComponents={[CustomBox, RaBox]}>
    <CustomBox>
        <TextField source="name"/>
        <RaBox>
            <NumberInput source="age" />
        </RaBox>
    </CustomBox>
</CompactShowLayout>

ShowSplitter

Need to mix up different layouts on the same page and separate different sections? The <ShowSplitter/> component helps you do just that with ease.

  • Pass the component as single child to the <Show/> component.
  • Then pass your different layouts to the <ShowSplitter/>'s props leftSide and rightSide.

hint - to escape the default <Card/> surface provided by the <Show/> component pass your custom value, e.g. component="div".

import { ShowSplitter } from 'ra-compact-ui';

...

const StaffShow = props => (
    <Show
        {...props}
        component="div"
    >
        <ShowSplitter
            leftSide={
                <SimpleShowLayout>
                    <AvatarShowField />
                    <TextField source="full_name" />
                    <TextField source="email" />
                    <ArrayField source="skills">
                        <SingleFieldList>
                            <ChipField source="name" />
                        </SingleFieldList>
                    </ArrayField>
                </SimpleShowLayout>
            }
            rightSide={
                <TabbedShowLayout>
                    <Tab label="Overview">
                        <TextField source="description" />
                    </Tab>
                    <Tab label="Projects">
                        {/* add more fields here */}
                    </Tab>
                </TabbedShowLayout>
            }
        />
    </Show>
);

image

Override and customize the way the layout is split using the leftSideProps and rightSideProps props. You can pass objects with props which will be destructured to the respective material-ui's Grid components which wrap the passed layouts.

The component prop is also supported by each side of the split layout. Example values:

<ShowSplitter
    leftSideProps={{
        md: 4,
        component: 'div'
    }}
    rightSideProps={{
        md: 8
    }}
    leftSide={...}
    rightSide={...}
/>

Create & Edit View Components

CompactForm

Provides form layout customization out of the box just like using the <SimpleForm/>.

Pass to layoutComponents prop an array which specifies the used layout components to be escaped as non-input components while rendering.

Important - All layout components should have a specified displayName.

import { CompactForm, RaBox } from 'ra-compact-ui';

...

const StaffEdit = props => (
    <Edit {...props}>
        <CompactForm layoutComponents={[RaBox]}>
            <RaBox display="flex" justifyContent="space-around">
                <TextInput source="full_name" />
                <TextInput source="email" />
            </RaBox>
            <TextInput source="description" />
            <TextInput source="avatar_url" />
        </CompactForm>
    </Edit>
);

About Author

An enthusiast in 💖 with building software who likes to call it "the grown up's LEGO".

If you enjoy the library and want to support me, you can always Buy Me A Coffee

ra-compact-ui's People

Contributors

jfm-its avatar jtomaszewski avatar luigimorel avatar notz avatar trodery avatar valentinndimitroff 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  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

ra-compact-ui's Issues

Feature Request: replacement tab component

Hi

It would be nice to have a component to replace the Original React-Admin Tab component so that we could render custom layouts within

Currently the labels of fields do not show up as the Original Component has no knowledge of the custom layouts

Console Log in CompactShowLayout.js

clg

Getting a log in the console from CompactShowLayout.js line number 62

Code causing console log
console.log('recursion', { index: index, props: props, child: child });

BoxedShowLayout doesn't work

Hi,

Really nice work but when I try to use the BoxedShowLayout with RaBox nothing happens. Maybe I did something wrong. On the other hand the grid works perfectly.

import React from "react";
import { Show, TabbedShowLayout, Tab, TextField } from "react-admin";
import { GridShowLayout, RaGrid, BoxedShowLayout, RaBox } from "ra-compact-ui";

export default function TestRunShow(props) {
  return (
    <div>
      <Show {...props}>
        <TabbedShowLayout>
          <Tab label="Summary">
            <BoxedShowLayout className="boxedShowLayout">
              <RaBox display="flex">
                <RaBox display="flex" justifyContent="space-between">
                  <TextField source="status" />
                  <TextField source="reference" />
                </RaBox>
              </RaBox>
            </BoxedShowLayout>
            <GridShowLayout className="gridShowLayout">
              <RaGrid container direction="row">
                <RaGrid item xs>
                  <TextField source="status" />
                </RaGrid>
                <RaGrid item xs>
                  <TextField source="reference" />
                </RaGrid>
              </RaGrid>
            </GridShowLayout>
          </Tab>
        </TabbedShowLayout>
      </Show>
    </div>
  );
}

Capture d’écran 2021-01-29 à 13 52 35

Any idea ?

Example of working code

Hi,
I really like the work you made, but it's difficult to understand how to use this package.
If you could provide an example of code I would really appreciate.

Thanks

Support for react ^17?

Will this be updated for use with React 17?

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peer react@"^16.8.0 || ^17.0.0" from @material-ui/[email protected]
npm ERR!   node_modules/@material-ui/core
npm ERR!     @material-ui/core@"^4.11.0" from the root project
npm ERR!     peer @material-ui/core@"^4.x" from [email protected]
npm ERR!     node_modules/ra-compact-ui
npm ERR!       ra-compact-ui@"*" from the root project
npm ERR!   1 more (react-dom)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.x" from [email protected]
npm ERR! node_modules/ra-compact-ui
npm ERR!   ra-compact-ui@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Warning: Each child in a list should have a unique "key" prop.

Hey, awesome layout for react-admin!

Recently I found an issue with multiple fields in single RaBox component.

Example:

<RaBox flexGrow={4} display='flex' flexDirection='column'>
  <TextField source='title' />
  <TextField source='subtitle' />
</RaBox>

The code above produces following error in console:

Warning: Each child in a list should have a unique "key" prop.

Check the render method of `Styled(MuiBox)`. It was passed a child from CompactShowLayout. See https://reactjs.org/link/warning-keys for more information.

But if it is a single field in each RaBox, no warnings.

Example:

<RaBox flexGrow={4} display='flex' flexDirection='column'>
  <RaBox>
    <TextField source='title' />
  </RaBox>
  <RaBox>
    <TextField source='subtitle' />
  </RaBox>
</RaBox>

It would be amazing if this minor issue can be fixed.

Thanks!

Custom Fields using Controller Props are not working in BoxedShowLayout

<ShowController {...props} component="div">
        {(controllerProps) => 
            <ShowView {...props} actions={<TaskShowActions />} {...controllerProps}>
                <BoxedShowLayout>
                  <RaBox display="flex">
                    <RaBox
                      display="flex"
                      flexWrap="wrap"
                      flexGrow={4}
                      className={classes.detailsBox}
                    >
                      <RaBox
                        flex="0 0 100%"
                        display="flex"
                        justifyContent="space-between"
                      >
                        <TextField label="Task Id" source="taskId" />
                        <TextField
                          label="Task Type"
                          source="taskTypeDisplayName"
                        />
                        {controllerProps.record &&
                          controllerProps.record.taskType ===
                            "order_management_task" && (
                            <TextField
                              label="Customer Name"
                              source="customerName"
                            />
                          )}
                        {controllerProps.record &&
                          controllerProps.record.taskType ===
                            "order_management_task" && (
                            <TextField label="Phone Number" source="phone" />
                          )}
                      </RaBox>
                    </RaBox>
                  </RaBox>
                </BoxedShowLayout>
            </ShowView>
        }
      </ShowController>

TypeError: Cannot read property 'source' of undefined

withStyles_default is not defined

Once I've added your example to latest version of react-admin (3.14.5) it fails with a runtime error withStyles_default is not defined. Any idea what's wrong?

CompactForm throws error in production when child is a function

I have the following piece of code, aligned to a material ui stepper which works perfectly in Development.

                <CompactForm layoutComponents={[RaBox]} toolbar={buttons()} {...props}>
                    <FormDataConsumer>
                        {({ formData, ...rest }) => getStepContent(activeStep, formData)}
                    </FormDataConsumer>
                </CompactForm>

However when I move it to production I get an error thrown in CompactFormView at this point variant={x.props.variant || variant} because x.props isnt a thing for the child function.

React does not recognize the `basePath`

I get the following error when I use boxedshowlayout:

react-dom.development.js:86 Warning: React does not recognize the basePath prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase basepath instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at span
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Grid2 (http://localhost:5173/node_modules/.vite/deps/chunk-6O75EDD4.js?v=9e94d845:6636:24)
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Labeled (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:168436:27)
at div
at RaField (http://localhost:5173/node_modules/.vite/deps/ra-compact-ui.js?v=9e94d845:243:9)
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Grid2 (http://localhost:5173/node_modules/.vite/deps/chunk-46XUJWJX.js?v=9e94d845:425:26)
at RaGrid (http://localhost:5173/node_modules/.vite/deps/ra-compact-ui.js?v=9e94d845:584:9)
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at CardContent2 (http://localhost:5173/node_modules/.vite/deps/chunk-FQCDPE3U.js?v=9e94d845:6147:21)
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at CardContentInner (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:2767:29)
at CompactShowLayout (http://localhost:5173/node_modules/.vite/deps/ra-compact-ui.js?v=9e94d845:457:9)
at GridShowLayout
at span
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Grid2 (http://localhost:5173/node_modules/.vite/deps/chunk-6O75EDD4.js?v=9e94d845:6636:24)
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Labeled (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:168436:27)
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Grid2 (http://localhost:5173/node_modules/.vite/deps/chunk-6O75EDD4.js?v=9e94d845:6636:24)
at Tab (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:182918:27)
at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3429:5)
at Outlet (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3728:26)
at div
at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3429:5)
at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3788:5)
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at OptionalRecordContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:11138:22)
at TabbedShowLayout (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:182999:28)
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Paper2 (http://localhost:5173/node_modules/.vite/deps/chunk-ETJAFPX2.js?v=9e94d845:124:21)
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Card2 (http://localhost:5173/node_modules/.vite/deps/chunk-FQCDPE3U.js?v=9e94d845:5755:21)
at div
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at ShowView (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:179666:27)
at RecordContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:10625:25)
at ShowContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:16447:25)
at ShowBase (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:16478:25)
at Show (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:179751:21)
at JobSeekerShow (http://localhost:5173/src/resources/JobSeeker/JobSeekerShow?import:104:26)
at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3429:5)
at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3788:5)
at ResourceContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:19227:25)
at Resource (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:19243:26)
at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3429:5)
at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3788:5)
at Suspense
at ErrorBoundary2 (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:4405:39)
at div
at main
at div
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at Layout (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:4877:24)
at MyLayout
at div
at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3429:5)
at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3788:5)
at CoreAdminRoutes (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:18879:7)
at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3429:5)
at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3788:5)
at CoreAdminUI (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:18953:22)
at div
at http://localhost:5173/node_modules/.vite/deps/chunk-SIYINNXL.js?v=9e94d845:740:49
at ScopedCssBaseline2 (http://localhost:5173/node_modules/.vite/deps/chunk-FQCDPE3U.js?v=9e94d845:13659:21)
at AdminUI (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:184371:22)
at ThemeProvider (http://localhost:5173/node_modules/.vite/deps/chunk-6O75EDD4.js?v=9e94d845:4812:5)
at ThemeProvider2 (http://localhost:5173/node_modules/.vite/deps/chunk-6O75EDD4.js?v=9e94d845:4899:5)
at ThemeProvider (http://localhost:5173/node_modules/.vite/deps/chunk-DPJHASPB.js?v=9e94d845:303:12)
at ThemeProvider2 (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:1682:27)
at ResourceDefinitionContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:18474:19)
at NotificationContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:5476:25)
at I18nContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:5601:19)
at DummyRouter (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:6721:25)
at BasenameContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:6694:25)
at AdminRouter (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:6711:24)
at QueryClientProvider2 (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:2844:25)
at PreferencesEditorContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:18385:25)
at StoreContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:4423:22)
at CoreAdminContext (http://localhost:5173/node_modules/.vite/deps/chunk-44TGPRAS.js?v=9e94d845:18517:32)
at AdminContext (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:184414:25)
at Admin (http://localhost:5173/node_modules/.vite/deps/chunk-GH4ERXBK.js?v=9e94d845:184677:32)
at SiteAdmin
at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3429:5)
at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3788:5)
at Router (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:3735:15)
at BrowserRouter (http://localhost:5173/node_modules/.vite/deps/chunk-BYM7LI66.js?v=9e94d845:4511:5)
at App
printWarning @ react-dom.development.js:86
error @ react-dom.development.js:60
validateProperty$1 @ react-dom.development.js:3757
warnUnknownProperties @ react-dom.development.js:3803
validateProperties$2 @ react-dom.development.js:3827
validatePropertiesInDevelopment @ react-dom.development.js:9541
setInitialProperties @ react-dom.development.js:9830
finalizeInitialChildren @ react-dom.development.js:10950
completeWork @ react-dom.development.js:22193
completeUnitOfWork @ react-dom.development.js:26596
performUnitOfWork @ react-dom.development.js:26568
workLoopSync @ react-dom.development.js:26466
renderRootSync @ react-dom.development.js:26434
performConcurrentWorkOnRoot @ react-dom.development.js:25738
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 17 more frames

Missing `key` parameter?

When using code like this:

<CompactShowLayout layoutComponents={[DetailCard]}>
    <DetailCard>
      <TextField label="Street Name" source="address.streetName" />
      <TextField label="Suburb or Town" source="address.suburb" />
    </DetailCard>
</CompactShowLayout>

We get following error:

Warning: Each child in a list should have a unique "key" prop.

Check the render method of `DetailCard`. It was passed a child from CompactShowLayout. See https://fb.me/react-warning-keys for more information.
    in RaField (created by CompactShowLayout)

Looking by react tree, seems like key is not passed to RaField when a field is wrapped in it? Maybe this line https://github.com/ValentinnDimitroff/ra-compact-ui/blob/master/src/details/CompactShowLayout.jsx#L39 should accept and pass over the props from https://github.com/ValentinnDimitroff/ra-compact-ui/blob/master/src/core/recursiveMethods.js#L38, or at least the props.key .

image

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.