Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry

AutoComplete: get the id for the user that i was choosen from users list, post request with status 400 in react.js ?

AutoComplete: get the id for the user that i was choosen from users list, post request with status 400 in react.js ?

Based on your code I observed this.

  • You are already passing invoice?.id in statusGropButton(invoice.status, invoice?.id) method.
  • You are again expecting id from the input as id?.id in assignToUser(id?.id, users.id, message). Why?

Just assuming, because of that the invoiceId is going as undefined. Try by passing just id instead of id?.id while calling the api functions.

You are opening a Dialogue by using assignToUserDialog flag. While submitting the form, you are doing dispatch(assignToUser(id?.id, users.id, message)); in which users is an array. That is the reason you are getting undefined. I would suggest you maintain the specific user information for which the dialogue is opened and send that specifc user.id to the API call.


7 0

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online