Skip to main content
Repair formatting
Source Link
halfer
  • 20.4k
  • 19
  • 108
  • 200

Dropzone in Dynamically Created Modaldynamically created modal and Child Divchild div

I've had many Dropzones throughout my application and to organize my modals a bit better, I have started to dynamically create a modal div whenever I need to open a new popup. I have noticed that when a Dropzone is created in the modal div which is dynamically created, there are two settings which don't work clickable and previewsContainer.

I get the following error: Uncaught Error: Invalid clickable option provided. Please provide a CSS selector, a plain HTML element or a list of those.

Uncaught Error: Invalid clickable option provided. Please provide a CSS selector, a plain HTML element or a list of those.

And this is my configuration, which doesn't change between the dynamically-created and pre-created:

`

{
        dictDefaultMessage: "Drop documents here (or click) to capture/upload.",
        clickable: '.open-upload-prompt',
        timeout: "360000",
        chunking: true,
        maxFilesize: 400000000,
        chunkSize: 1000000,
        parallelChunkUploads: true,
        autoProcessQueue: true,
        parallelUploads: 1,
        addRemoveLinks: true,
        previewsContainer: '.dropzone-preview',
}

`

If I remove the clickable and previewsContainer, the Dropzone works correctly.

Dropzone in Dynamically Created Modal and Child Div

I've had many Dropzones throughout my application and to organize my modals a bit better, I have started to dynamically create a modal div whenever I need to open a new popup. I have noticed that when a Dropzone is created in the modal div which is dynamically created, there are two settings which don't work clickable and previewsContainer.

I get the following error: Uncaught Error: Invalid clickable option provided. Please provide a CSS selector, a plain HTML element or a list of those.

And this is my configuration, which doesn't change between the dynamically-created and pre-created:

`

{
        dictDefaultMessage: "Drop documents here (or click) to capture/upload.",
        clickable: '.open-upload-prompt',
        timeout: "360000",
        chunking: true,
        maxFilesize: 400000000,
        chunkSize: 1000000,
        parallelChunkUploads: true,
        autoProcessQueue: true,
        parallelUploads: 1,
        addRemoveLinks: true,
        previewsContainer: '.dropzone-preview',
}

`

If I remove the clickable and previewsContainer, the Dropzone works correctly.

Dropzone in dynamically created modal and child div

I've had many Dropzones throughout my application and to organize my modals a bit better, I have started to dynamically create a modal div whenever I need to open a new popup. I have noticed that when a Dropzone is created in the modal div which is dynamically created, there are two settings which don't work clickable and previewsContainer.

I get the following error:

Uncaught Error: Invalid clickable option provided. Please provide a CSS selector, a plain HTML element or a list of those.

And this is my configuration, which doesn't change between the dynamically-created and pre-created:

{
        dictDefaultMessage: "Drop documents here (or click) to capture/upload.",
        clickable: '.open-upload-prompt',
        timeout: "360000",
        chunking: true,
        maxFilesize: 400000000,
        chunkSize: 1000000,
        parallelChunkUploads: true,
        autoProcessQueue: true,
        parallelUploads: 1,
        addRemoveLinks: true,
        previewsContainer: '.dropzone-preview',
}

If I remove the clickable and previewsContainer, the Dropzone works correctly.

Source Link
Matthew
  • 1.6k
  • 6
  • 35
  • 60

Dropzone in Dynamically Created Modal and Child Div

I've had many Dropzones throughout my application and to organize my modals a bit better, I have started to dynamically create a modal div whenever I need to open a new popup. I have noticed that when a Dropzone is created in the modal div which is dynamically created, there are two settings which don't work clickable and previewsContainer.

I get the following error: Uncaught Error: Invalid clickable option provided. Please provide a CSS selector, a plain HTML element or a list of those.

And this is my configuration, which doesn't change between the dynamically-created and pre-created:

`

{
        dictDefaultMessage: "Drop documents here (or click) to capture/upload.",
        clickable: '.open-upload-prompt',
        timeout: "360000",
        chunking: true,
        maxFilesize: 400000000,
        chunkSize: 1000000,
        parallelChunkUploads: true,
        autoProcessQueue: true,
        parallelUploads: 1,
        addRemoveLinks: true,
        previewsContainer: '.dropzone-preview',
}

`

If I remove the clickable and previewsContainer, the Dropzone works correctly.