codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
24 stars 23 forks source link

[Bug Report] - Errors with MUI Autocomplete #640

Closed leekahung closed 1 month ago

leekahung commented 1 month ago

Describe the bug:

Currently, we have a MUI Autocomplete component being used for our SetAclPermissionsModal. However, the current modal trigger warnings by MUI by passing the incorrect props/attributes/etc.

Screenshot 2024-05-22 at 10 12 06 PM

After a big of digging, I believe I have isolated the problem. I'll post the potential solution after saying how to reproduce.

To Reproduce:

Steps to reproduce the behavior:

  1. Go to Profile
  2. Click on Share Documents Button
  3. See error

Possible Fix:

The problem likely lies with props like helperText being used in Autocomplete. However, these props are not part of the component (https://mui.com/material-ui/api/autocomplete/). However, they are props for TextField (https://mui.com/material-ui/api/text-field/).

Which is why the solution for this should be to remove the incompatible props from Autocomplete and move the values used in there with the TextField inside the renderInput prop.

Additionally, the webId comes out undefined, which means the webId is likely not being passed through our existing React Context for SignedInUserContext.