First of all, when I click the plus button in my Plasmic Studio project, Text Input is the one that appears under customizable components, where as Text Field appears under Project Components. I originally used Text Input before I noticed this, and I have since switched to Text Field. I have no idea how this happened, unfortunately, as it doesn’t happen on new projects I make.
When I drag in either and give it a value, I get this error:
ForwardRef(BaseInput_) contains an input of type undefined with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props.
Things I Tried:
- Upgrading all my plasmic packages
- Deleting my node_modules folder and package-lock.json file, then running $ npm install
- Passing undefined to one of either value/default value through code, and passing a string to the other
Some things to note:
- This also happens if I give it a default value and nothing else.
- The error does NOT appear when I create a new project and repeat the same steps.
- The error DOES appear if I preview artboard instead of opening it on my dev server.
- Anything that’s not linked up in my Studio project is being handled by code in my codegen project.
- The error appears regardless of if I pass a prop to value/defaultValue or if I just type a random string in directly
What could have happened to make this bug appear in my project?
Relevant links:
- Project - This leads to the component where the input field is being rendered.