react-step-builder icon indicating copy to clipboard operation
react-step-builder copied to clipboard

Two consecutive "props.setState" bug.

Open gkdgbilal opened this issue 3 years ago • 1 comments

Hello,

I used two consecutive "props.setState" functions, only the latter one is working, the first one is not working. When I changed order of these two statements, again only the latter one is working, the first one is not working.

line 1: props.setState('documentFiles', documentFiles); // not working line 2: props.setState('qualityCertificates', qualityCertificates); // working

package.json here; "dependencies": { "@devextreme/runtime": "^3.0.3", "bootstrap": "^5.1.3", "core-js": "^2.6.5", "demos-react-captcha": "^1.0.11", "devextreme": "^21.2.4", "devextreme-react": "^21.2.4", "html2canvas": "^1.4.1", "i18next": "^21.6.6", "jspdf": "^2.5.1", "next": "12.0.7", "react": "17.0.2", "react-dom": "17.0.2", "react-i18next": "^11.15.3", "react-icons": "^4.3.1", "react-select": "^5.2.1", "react-step-builder": "^2.0.11", "react-step-progress-bar": "^1.0.3", "react-toastify": "^8.1.0", "reactstrap": "^9.0.1" }, "devDependencies": { "@fortawesome/fontawesome-free": "^5.15.4", "eslint": "8.5.0", "eslint-config-next": "12.0.7" }

gkdgbilal avatar Apr 13 '22 12:04 gkdgbilal

Hello Bilal, because of problems like this one, I removed the global state methods in the version 3. I highly recommend upgrading to the latest version and use your own state management for your forms.

You can read more about the version 3 here.

Let me know if you have any questions regarding the upgrade.

sametweb avatar Apr 17 '22 08:04 sametweb