jaredpalmer / formik-persist

💾 Persist and rehydrate a Formik form to localStorage
MIT License
377 stars 56 forks source link

Omit selected fields from being persisted #6

Open Ciaran0 opened 6 years ago

Ciaran0 commented 6 years ago

Small PR to give Formik-Persist the ability to ignore / omit certain fields from being persisted to local storage.

There is a number of real world use cases where people might want to do this. For example password confirmation, email confirmation etc.

Let me know what you think.

Really enjoying Formik! Cheers.

Ciaran0 commented 6 years ago

Just realised I should ignore touched and errors for those fields. Ill add this

Ciaran0 commented 6 years ago

@jaredpalmer What do you think of this?

dzienisz commented 6 years ago

@Ciaran0 can you resolve conflicts?

Ciaran0 commented 5 years ago

Hi @dzienisz, I would but I don't see this being merged in anytime soon

Ciaran0 commented 5 years ago

@jaredpalmer Thanks for approving this 😄 I have resolved the conflicts.

quocb commented 5 years ago

This is useful. Is this going to be merged?

hendrul commented 5 years ago

I need it to ignore isSubmitting... merge when??

quocb commented 5 years ago

^^ that and need to ignore Password fields too. If this doesn't come out soon I'll just have to not use this and roll my own.

hendrul commented 5 years ago

Men this only works for values, touched, and errors but not for other fields like isSubmitting

rodgomesc commented 5 years ago

why this is not merged yeat????? cmonnn

hendrul commented 5 years ago

why this is not merged yeat????? cmonnn

hahahaha Que mal inglessss! xDDD

mhilland commented 5 years ago

+1

dzienisz commented 5 years ago

Yes!!!

mwmcode commented 4 years ago

Would this work with nested fields <Field name='address.city' />?

Romusc commented 4 years ago

@jaredpalmer Pleeeeeaaase merge !

ma-v commented 3 years ago

Up @jaredpalmer, pleaase ! 🙏 Many thanks

jayzyaj commented 3 years ago

Up @jaredpalmer!!

jayzyaj commented 3 years ago

Any updates? @jaredpalmer