prevention-point icon indicating copy to clipboard operation
prevention-point copied to clipboard

Select component warning on submit

Open mariekers opened this issue 4 years ago • 3 comments

When form data is submitted and the server sends a successful post response for a visit, visit.service and visit.program goes from an id (integer) to an object. This throws a Material-UI select warning because an object is not an expected value.

2 possible solutions:

  1. hold two different state objects for the visit in mobx, one for form data/input and one for current visit/responses
  2. useState for onChange values inside the component itself. this method will need extra care that the correct values are validated and submitted. first method preferred

mariekers avatar May 12 '20 16:05 mariekers

This is mis-match between select value possibilities and store data that controls the component is happening in multiple places.

A more permanent solution is a component level loading state, so these select components are not render when either

  • data is being submitted
  • data is being retrieved from the api (program lists, insurers lists, etc)

MikeyManoguerra avatar May 16 '20 12:05 MikeyManoguerra

@crsmyz do you still want to work on this?

mariekers avatar Aug 11 '20 23:08 mariekers

@mariekers @crsmyz has there been any movement on this?

sxgormley avatar Sep 27 '20 19:09 sxgormley