I am using react-admin for admin interface. In edit form aside i want to show edited value (just to understand how to capture form changed values, later will show data from api for those changed values). My code as follows (Simplified)
const Aside = ({ record }) => {
return (
<div style={{ width: 200, margin: '1em' }}>
<Typography variant="h6">Student details</Typography>
<Typography variant="body2">
{record && (
<Typography variant="body2">
{//Will Show current ArrayInput values here, Name/role of current students}
</Typography>
)}
</Typography>
</div>
)};
export const MyEdit = (props) => (
<Edit aside={<Aside />} {...props}>
<SimpleForm>
<ArrayInput source="students">
<SimpleFormIterator>
<TextInput source="name" /
<NumberInput source="role" />
</SimpleFormIterator>
</ArrayInput>
</SimpleForm>
</Edit>
);
How to update aside onchange of ArrayInput values?