When using formik 1.3.0 and draft.js, I'm getting hundreds of warnings thrown by immutable, when trying to type in the RichEditorExample component. The warnings say: iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. This is only happening when I'm calling setFieldValue, from draft.js, using a lodash-like path syntax field, to modify a value that's nested more than one-level deep.
See example attached (cloned from: https://github.com/jaredpalmer/formik/issues/93). All that I did was upgrade to formik 1.3.0 and make the initial structure nested.
The draft.js component is now using the updated path: editorState.edit instead of editorState.
No Errors thrown
I was able to track this bug down to lodash.cloneDeep. Since Draft.js uses Immutable.js, we shouldn't be using lodash. Short of bringing in Immutable to deep clone this structure, are there any lightweight alternatives?
CodeSandbox Link:
Bump: Just wanted to see if anyone has thought about this. I'd love to bounce ideas off of people!
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it.
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it.
please open this issue.
This issue is still ongoing and it is very annoying.
I'm also having this problem with Formik 1.4.2 and Draft 0.10.5. My use case includes having a FieldArray of Draft editors.
The performance of my form makes it unusable so it'd be nice to get this issue reopened.
Does anyone know if this issue also exists for Slate?
I managed to stop the warnings by following the steps here: https://github.com/facebook/draft-js/issues/950#issuecomment-381911759
I hope it works for you too!
Most helpful comment
please open this issue.
This issue is still ongoing and it is very annoying.