-1

I am using survey-react-ui version 1.12.27, all other events are triggering but onUploadFiles event is not triggering.

When i select file using "choose file" button event does not trigger. while drag and drop the file to the drag drop area triggers the onUploadFiles event. i tried with different versions of react and different versions of survey-react-ui, for each new project it works fine but in my project where i need it work correctly it is not working.

i tried to manually fire the model.onUploadFiles event by adding an event listener to the choose file button, but in this case i am not able to get all the call backs which are available survey-react-ui's onUploadFiles.

3
  • 1
    Can you please share the JSON of a your file question - this will help with the minimal reproducible sample and the JavaScript as well. For example as per the documentation: > The event applies only if storeDataAsText is false This is just a pointer, but once you share your JSON and your JavaScript, we can help pretty fast Commented Mar 14 at 8:55
  • "elements": [ { "type": "file", "name": "qDocument", "title": "xxxx", "allowMultiple": true, "allowImagesPreview": false, "acceptedTypes": ".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, image/*, .pdf, application/msword, application/vnd.ms-powerpoint, .txt, .docx, .xlsx, .pptx", "storeDataAsText": false, "maxSize": 20971520 } ] Commented Mar 14 at 12:20
  • storeDataAsText is set to false. Commented Mar 14 at 12:21

1 Answer 1

-1

I figured out, latest version does not support bootstrap. when i started updating 4 years old version to 1.12.26, documentation stated that bootstrap support is obsolete, but they also provided how to apply bootstrap them. as per surveyjs documentation they update version every 2 weeks, in version 1.12.27 and 2.0.0 they removed it completely.

the issue was that they have not handled file upload case for bootstrap and that's why the event was not working.

if someone is looking to migrate or update version and using bootstrap, they have to choose one of their provided theme and you can customize that theme to match your website theme.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.