Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ugly fit of embedded array field #18

Open
pedrohfornari opened this issue Jan 24, 2018 · 2 comments
Open

Ugly fit of embedded array field #18

pedrohfornari opened this issue Jan 24, 2018 · 2 comments

Comments

@pedrohfornari
Copy link

I am kind of new to react/js and am using aor to develop a platform. I am trying to dispose a history datagrid which is passed from my API as an array. You can see my issue in the image bellow.

Please let me know if I can help you with something or if you have some kind of solution.

pasted image at 2018_01_23 02_42 pm

@MhdSyrwan
Copy link
Owner

Can you provide the code you used to generate this ui ?

@pedrohfornari
Copy link
Author

pedrohfornari commented Jan 25, 2018

Yes, for sure

            <FormTab label="História">
              <EmbeddedArrayField source="history" label="Modificações">
                <TextField source="history_change_reason" label="Razão da modificação"/>
                <NumberField source="job_status" label="Status"/>
                <TextField source="expected_start" label="Data de início"/>
              </EmbeddedArrayField>
            </FormTab>

It's a FormTab inside a TabbedForm of the Edition page. In fact what I'm doing is showing the history of that model.

My API response is:

{type: "Job", 
  id: "10",
  creation_date: MM/DD/YYYY,
 history:[{
               job_status:0, history_change_reason:RERE, expected_start:MM/DD/YYYY]},
               job_status:0.5, history_change_reason:RARA, expected_start:MM/DD/YYYY]},]
.
.
.
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants