tsedio / tsed-formio

Repository dedicated to formiojs.
https://formio.tsed.io
14 stars 8 forks source link

[QUESTION] Can @tsed/react-formio be used without Ts.ED framework? #117

Closed mm-dsibinski closed 1 month ago

mm-dsibinski commented 1 year ago

Hi! Can @tsed/react-formio be considered a better alternative to @formio/react package? In other words: is tsed-formio somehow tied to Ts.ED framework?

I'd like to use it instead of @formio/react in a typical React project.

Romakita commented 1 year ago

Hello @mm-dsibinski It’s totally independant of the tsed framework. It’s effectivly annalternative of react-formio ;)

mm-dsibinski commented 1 year ago

Thanks for answering @Romakita 🙂 I checked the package, and it seems you're doing a great job here! 💪

However, I see that the React API is a bit different from original FormIO's package. Which is not a disadvantage of course, but I noticed that FormBuilder component from @tsed/react-formio expects to separately provide components and display, while the original one accepts the whole form object. It's a bit problematic for me to use now, because I also provide some custom objects there (except components and display). Unfortunately, I had to do it to "hack" around some of FormIO caveats (🤪) and it's not easy to be refactored now.

Romakita commented 1 year ago

~The solution is to create your component that wrap the FormEdit and FormBuilder ;)~

The is the FormEdit: https://formio.tsed.io/?path=/story/reactformio-formedit--sandbox&args=typeChoices[0].label:Form;typeChoices[0].value:form;typeChoices[1].label:Resources;typeChoices[1].value:resource;displayChoices[0].label:Form;displayChoices[0].value:form;displayChoices[1].label:Wizard;displayChoices[1].value:wizard;displayChoices[2].label:Pdf;displayChoices[2].value:pdf;enableTags:true;options.template:tailwind;options.iconset:bx

I just separated the FormBuilder from the configuration form. My FormEdit proposal is more complete but not necessarily adapted for all projects.

See you Romain

github-actions[bot] commented 1 month ago

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective