Reactadmin - edit user roles Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceReact – the right way to pass form element state to sibling/parent elements?React: How do I update state.item[1] on setState? (with JSFiddle)How to update store state in react-redux?Passing a function from an object to the component to edit the stateReact-Admin: Cannot change the style of <Filter>react-admin saving a resource is sending parts of the wrong resourceGrouping & Aligning Items in <SimpleShowLayout> with react-adminSupport for resource nestingHow to connect to nested paths in React-admin? (e.g. http://my.api.to/users/active)react-admin exclude “record” from the redux-form

How to market an anarchic city as a tourism spot to people living in civilized areas?

Using "nakedly" instead of "with nothing on"

Simulating Exploding Dice

How are presidential pardons supposed to be used?

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

Need a suitable toxic chemical for a murder plot in my novel

Stopping real property loss from eroding embankment

How can players take actions together that are impossible otherwise?

Is drag coefficient lowest at zero angle of attack?

When is phishing education going too far?

How many things? AとBがふたつ

New Order #5: where Fibonacci and Beatty meet at Wythoff

Single author papers against my advisor's will?

Cauchy Sequence Characterized only By Directly Neighbouring Sequence Members

Can a non-EU citizen traveling with me come with me through the EU passport line?

How is simplicity better than precision and clarity in prose?

How do I automatically answer y in bash script?

How to say 'striped' in Latin

I'm having difficulty getting my players to do stuff in a sandbox campaign

Did the new image of black hole confirm the general theory of relativity?

What do I do if technical issues prevent me from filing my return on time?

Autumning in love

How does modal jazz use chord progressions?

When communicating altitude with a '9' in it, should it be pronounced "nine hundred" or "niner hundred"?



Reactadmin - edit user roles



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceReact – the right way to pass form element state to sibling/parent elements?React: How do I update state.item[1] on setState? (with JSFiddle)How to update store state in react-redux?Passing a function from an object to the component to edit the stateReact-Admin: Cannot change the style of <Filter>react-admin saving a resource is sending parts of the wrong resourceGrouping & Aligning Items in <SimpleShowLayout> with react-adminSupport for resource nestingHow to connect to nested paths in React-admin? (e.g. http://my.api.to/users/active)react-admin exclude “record” from the redux-form



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I have two different components User and Role. There is a many-to-many relationship between User and Role.



Is there any solution how should I get all User roles in a edit window?



The exact field like I have in my UserCreate action:



<ReferenceArrayInput 
source="UserRoles"
reference="Role"
sort= field: 'Name', order: 'ASC'
>
<SelectArrayInput optionText="Name"/>
</ReferenceArrayInput>


Image how it should look like link



Any ideas?



EDIT:



I have already tried to combine ReferenceArrayInput and ReferenceManyField to achieve a goal to have all current user roles and should be able to edit them.



But it is not good solution, I was just my idea. I don't have any other ideas how should i solve this. Should i call API call for data and use them somehow with ReferenceArrayInput, or how this can be done?










share|improve this question
























  • Could you add a code snippet to the question? That way people could recommend you more things

    – Alejandro Vales
    Mar 21 at 10:17






  • 2





    Pure code-writing requests are off-topic on Stack Overflow — we expect questions here to relate to specific programming problems — but we will happily help you write it yourself! Tell us what you've tried, and where you are stuck. This will also help us answer your question better.

    – Stefan Becker
    Mar 21 at 10:18











  • @StefanBecker I edited the question, I would like to know how this should be done, not the full code

    – Jason Derrick
    Mar 25 at 9:49

















1















I have two different components User and Role. There is a many-to-many relationship between User and Role.



Is there any solution how should I get all User roles in a edit window?



The exact field like I have in my UserCreate action:



<ReferenceArrayInput 
source="UserRoles"
reference="Role"
sort= field: 'Name', order: 'ASC'
>
<SelectArrayInput optionText="Name"/>
</ReferenceArrayInput>


Image how it should look like link



Any ideas?



EDIT:



I have already tried to combine ReferenceArrayInput and ReferenceManyField to achieve a goal to have all current user roles and should be able to edit them.



But it is not good solution, I was just my idea. I don't have any other ideas how should i solve this. Should i call API call for data and use them somehow with ReferenceArrayInput, or how this can be done?










share|improve this question
























  • Could you add a code snippet to the question? That way people could recommend you more things

    – Alejandro Vales
    Mar 21 at 10:17






  • 2





    Pure code-writing requests are off-topic on Stack Overflow — we expect questions here to relate to specific programming problems — but we will happily help you write it yourself! Tell us what you've tried, and where you are stuck. This will also help us answer your question better.

    – Stefan Becker
    Mar 21 at 10:18











  • @StefanBecker I edited the question, I would like to know how this should be done, not the full code

    – Jason Derrick
    Mar 25 at 9:49













1












1








1








I have two different components User and Role. There is a many-to-many relationship between User and Role.



Is there any solution how should I get all User roles in a edit window?



The exact field like I have in my UserCreate action:



<ReferenceArrayInput 
source="UserRoles"
reference="Role"
sort= field: 'Name', order: 'ASC'
>
<SelectArrayInput optionText="Name"/>
</ReferenceArrayInput>


Image how it should look like link



Any ideas?



EDIT:



I have already tried to combine ReferenceArrayInput and ReferenceManyField to achieve a goal to have all current user roles and should be able to edit them.



But it is not good solution, I was just my idea. I don't have any other ideas how should i solve this. Should i call API call for data and use them somehow with ReferenceArrayInput, or how this can be done?










share|improve this question
















I have two different components User and Role. There is a many-to-many relationship between User and Role.



Is there any solution how should I get all User roles in a edit window?



The exact field like I have in my UserCreate action:



<ReferenceArrayInput 
source="UserRoles"
reference="Role"
sort= field: 'Name', order: 'ASC'
>
<SelectArrayInput optionText="Name"/>
</ReferenceArrayInput>


Image how it should look like link



Any ideas?



EDIT:



I have already tried to combine ReferenceArrayInput and ReferenceManyField to achieve a goal to have all current user roles and should be able to edit them.



But it is not good solution, I was just my idea. I don't have any other ideas how should i solve this. Should i call API call for data and use them somehow with ReferenceArrayInput, or how this can be done?







reactjs react-admin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 7:48









marc_s

585k13011261272




585k13011261272










asked Mar 21 at 10:14









Jason DerrickJason Derrick

335




335












  • Could you add a code snippet to the question? That way people could recommend you more things

    – Alejandro Vales
    Mar 21 at 10:17






  • 2





    Pure code-writing requests are off-topic on Stack Overflow — we expect questions here to relate to specific programming problems — but we will happily help you write it yourself! Tell us what you've tried, and where you are stuck. This will also help us answer your question better.

    – Stefan Becker
    Mar 21 at 10:18











  • @StefanBecker I edited the question, I would like to know how this should be done, not the full code

    – Jason Derrick
    Mar 25 at 9:49

















  • Could you add a code snippet to the question? That way people could recommend you more things

    – Alejandro Vales
    Mar 21 at 10:17






  • 2





    Pure code-writing requests are off-topic on Stack Overflow — we expect questions here to relate to specific programming problems — but we will happily help you write it yourself! Tell us what you've tried, and where you are stuck. This will also help us answer your question better.

    – Stefan Becker
    Mar 21 at 10:18











  • @StefanBecker I edited the question, I would like to know how this should be done, not the full code

    – Jason Derrick
    Mar 25 at 9:49
















Could you add a code snippet to the question? That way people could recommend you more things

– Alejandro Vales
Mar 21 at 10:17





Could you add a code snippet to the question? That way people could recommend you more things

– Alejandro Vales
Mar 21 at 10:17




2




2





Pure code-writing requests are off-topic on Stack Overflow — we expect questions here to relate to specific programming problems — but we will happily help you write it yourself! Tell us what you've tried, and where you are stuck. This will also help us answer your question better.

– Stefan Becker
Mar 21 at 10:18





Pure code-writing requests are off-topic on Stack Overflow — we expect questions here to relate to specific programming problems — but we will happily help you write it yourself! Tell us what you've tried, and where you are stuck. This will also help us answer your question better.

– Stefan Becker
Mar 21 at 10:18













@StefanBecker I edited the question, I would like to know how this should be done, not the full code

– Jason Derrick
Mar 25 at 9:49





@StefanBecker I edited the question, I would like to know how this should be done, not the full code

– Jason Derrick
Mar 25 at 9:49












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55278109%2freactadmin-edit-user-roles%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55278109%2freactadmin-edit-user-roles%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript