Giter VIP home page Giter VIP logo

vvf1's Introduction

vvf1

A simple template using formio, vue2, vuex and vite.

Scripts

  pnpm run dev # start dev server
  pnpm run build # build for production
  pnpm run serve # locally preview production build

Usage

  git clone ...
  cd vvf1
  pnpm install
  pnpm run dev

Add a textField with the builder, then test the form, see how the submission data and the form persist in the store, and how a database update is simulated with a 2 seconds timeout

Notes

  • degit is recommended instead of 'git clone' if you want to start a new project

  • CSS imports are tricky... cf. styles.scss

  • pnpm is great!

vvf1's People

Contributors

dependabot[bot] avatar mgurzixo avatar

Watchers

 avatar

vvf1's Issues

Builder modal does not close

This is a copy of issue #4297 that I raised on formio.js

Environment

  • Hosting type
    • Local deployment
      • Version: Linux Ubuntu 20.03
  • Formio.js version: 4.14.0-rc.20
  • Frontend framework: Vue2+vue-formio+Vite
  • Browser: Chrome/Firefox
  • Browser version: Latest

Steps to Reproduce

  1. git clone https://github.com/mgurzixo/vvf1.git
  2. cd vvf1
  3. pnpm install
  4. pnpm run dev
  5. Start a browser @ http://localhost:3000/
  6. Select 'Builder' option
  7. Insert a 'Layout / Field Set' component
  8. In the modal, click on 'Save'

Expected behaviour:

The modal closes and the component is inserted.

Observed behaviour:

The modal does not close.

Discussion

I am trying to setup formiojs to run with Vue and Vite. I got excellent results, and published a basic template. When testing it, everything worked smoothly with most components, except for a few of them where it is impossible to close the modal. All the Save/Cancel/Remove/X buttons are non-responsive.

This occurs on Chrome and Firefox.

The dev version uses Vite with HMR. But this occurs also with the production version which uses Rollup internally:

pnpm run build
pnpm run serve

This occurs with the following components:

  • Field Set
  • Panel
  • Well

But this does not occur with the others, and NOT with Columns (which is based also on NestedComponent)

I started to debug using DevTools, and it looks like editComponent() in [Webformbuilder.js] around line 1445 install eventListeners, but sometime later those handlers vanish, causing the modal to become unresponsive.

I tried to look at the code, but it is rather complex (I heard about formio just 1 week ago...) and I did not found where the problem came. I tried to fiddle with custom components, with the bug occuring sometime, sometime not...

I understand that my configuration is rather exotic, but I think that there is definitively a daemon lurking around in the deep...

Thanks if someone can have a look!

Michel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.