admin
admin copied to clipboard
Publish hydra client as a standalone package
Hi guys, great package!
Do you think it makes sense to publish the hydraClient
as a standalone npm package, and mention it in https://marmelab.com/admin-on-rest/RestClients.html?
Hi @fzaninotto,
There just a few files in this repository and the Hydra client has been designed to be usable without other features. Components provided by this package can also be used one by one with an existing admin on rest installation. Is it worth it to split this package in 2?
Regarding the doc, I'll send a PR!
It's up to you!
Are there any example docs to use the hydra client standalone? I want more control over all the layouts and would prefer to use react-admin + the hydraClient. I don't like all the magic that the api platform admin performs.
This is now documented @trsteel88: https://api-platform.com/docs/admin/getting-started#using-the-hydra-data-provider-directly-with-react-admin
Thanks. I saw this about an hour ago and thought I was losing my mind and missed it today.
Within my app I have a password reset endpoint. Is there any documentation for how I would load that in as a custom route?
Sorry for all the questions. This is a great library and you've done a great job. I'd be happy to contribute to the docs once I have a better understanding.
Hey @dunglas, are you able to help me with an issue I'm having with a ReferenceArrayInput?
When creating the form manually, I get the following error:
Uncaught TypeError: Cannot read property 'data' of undefined
at possibleValues.js:68
at Array.map (<anonymous>)
at getPossibleReferences (possibleValues.js:67)
at ReferenceArrayInputController.js:349
at index.js:76
at index.js:37
at index.js:89
at Function.mapToProps (index.js:37)
at mapToPropsProxy (wrapMapToProps.js:41)
at handleNewState (selectorFactory.js:55)
at handleSubsequentCalls (selectorFactory.js:69)
at pureFinalPropsSelector (selectorFactory.js:74)
at Object.runComponentSelector [as run] (connectAdvanced.js:72)
at Connect.onStateChange (connectAdvanced.js:239)
at Object.notify (Subscription.js:29)
at Subscription.notifyNestedSubs (Subscription.js:66)
at Connect.onStateChange (connectAdvanced.js:242)
at Object.notify (Subscription.js:29)
at Subscription.notifyNestedSubs (Subscription.js:66)
at Connect.onStateChange (connectAdvanced.js:242)
at Object.notify (Subscription.js:29)
at Subscription.notifyNestedSubs (Subscription.js:66)
at Connect.onStateChange (connectAdvanced.js:242)
at Object.notify (Subscription.js:29)
at Subscription.notifyNestedSubs (Subscription.js:66)
at Connect.notifyNestedSubsOnComponentDidUpdate (connectAdvanced.js:256)
at commitLifeCycles (react-dom.development.js:16725)
at commitAllLifeCycles (react-dom.development.js:18146)
at HTMLUnknownElement.callCallback (react-dom.development.js:147)
at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
at invokeGuardedCallback (react-dom.development.js:250)
at commitRoot (react-dom.development.js:18351)
at completeRoot (react-dom.development.js:19882)
at performWorkOnRoot (react-dom.development.js:19805)
at performWork (react-dom.development.js:19710)
at performSyncWork (react-dom.development.js:19684)
at requestWork (react-dom.development.js:19539)
at scheduleWork (react-dom.development.js:19346)
at Object.enqueueSetState (react-dom.development.js:12789)
at Connect.push../node_modules/react/cjs/react.development.js.Component.setState (react.development.js:354)
at Connect.onStateChange (connectAdvanced.js:245)
at Object.notify (Subscription.js:29)
at Subscription.notifyNestedSubs (Subscription.js:66)
at Connect.onStateChange (connectAdvanced.js:242)
at Object.notify (Subscription.js:29)
at Subscription.notifyNestedSubs (Subscription.js:66)
at Connect.onStateChange (connectAdvanced.js:242)
at Object.notify (Subscription.js:29)
at Subscription.notifyNestedSubs (Subscription.js:66)
at Connect.onStateChange (connectAdvanced.js:242)
Here is my Edit form:
export const TemplateEdit = (props) => {
return (
<Edit {...props} title={<TemplateTitle/>}>
<TabbedForm>
...
<FormTab label="Summary">
<TextInput source="name" label="Name" validate={required()}/>
<ReferenceArrayInput source="shotTypes" reference="shot-types">
<SelectArrayInput optionText="name"/>
</ReferenceArrayInput>
</FormTab>
...
</TabbedForm>
</Edit>
);
};
Am I missing something?
ShotTypes is a ManyToMany.
Thank you.
Any documentation on this?
@alanpoulain any documentation on this?