This topic was automatically generated from Slack. You can find the original thread here.
Need help with connect-react.
We are using the connect-react sdk to display Component Forms for different actions/triggers. Implementation is similar to the One SDK, thousands of API integrations. We store the configuredProps in db in the backend. When we pass the pre-configuredProps back again to the Component Form the values are visible in the form but they aren’t registered in the form’s internal state. Is this a known issue? And is there a workaround for this?
Please refer the screenshot. I’m happy to share sample code if needed.
Sometimes the dropdowns are not disabled however, the dropdown options are still not loaded.
I’ve gone through the code of the connect-react library and this is expected because the options fetch is only enabled when internal configuredProps change and not when the props are set on initial mount.
You can follow these steps after running the sample app I’ve shared:
• Select action from the component type dropdown
• Search for Google Sheets in the apps dropdown
• Select Google Sheets from the results
• Few actions from Google Sheets will be rendered below.
• Select any one, lets say Update Multiple Rows
• Its Component Form will be rendered underneath.
• Connect your account and fill the form.
• Now select another app from the app dropdown, lets say Slack.
• Select an action - Send Message.
• Its form will be rendered below - connect your slack account and fill the form.
• Now go to the Update Multiple Rows form, you can either follow the same steps to go to it or click on View/Edit in the last section which shows the forms you have filled.
• Now you will notice:
◦ Either the spreadsheetId and worksheetId dropdowns are disabled
◦ Or if they are not then when you click on them no options are available to select in the dropdown.
Note: I’m maintaining the configuredProps in react state against the componentKey. This is to simulate loading the configuredProps from db.
Just wanted to check in on this PR. I understand you’re tracking this internally and appreciate you triaging it quickly.
We’ve been using these fixes in production via the fork and they’ve been working well. Happy to make any changes or provide additional context if needed to help move this forward.
Is there anything blocking the review, or any way I can help get this merged?