Using VueMultiselect with Vue 3: A guide for beginners

I'm currently experimenting with the vue multiselect component, but when I include it in the template, I am encountering a series of warnings and errors.

<script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="067073632b6b736a726f75636a636572463428372836">[email protected]</a>"></script>
<script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="90e6e5f5d0a3bea2bea3a7">[email protected]</a>/dist/vue.global.js"></script>

// Main Component

const { createApp } = Vue;

const componentCaptura = {
    components:{
        'vue-multiselect': window.VueMultiselect.default,
    },
    data(){
        return {
            message:"Hello from the child component",
            products:[],
            product:null
        }
    },
    mounted(){},
    template:/* html */`
    <div class="content-wrapper animated fadeInLeft" style="padding: 0 2.2rem;">
        <div class="content-header row mb-1" style="border-bottom: 1px solid #d8d8d8;  -webkit-box-shadow:0 3px 5px -6px #222;-moz-box-shadow:0 3px 5px -6px #222;box-shadow:0 3px 5px -6px #222;">
            <div class="content-header-left col-md-6 col-12 mb-2 breadcrumb-new">
                <h2 class="content-header-title mb-0 d-inline-block">CONTROL ORIGINACION</h2>
                <div class="row breadcrumbs-top d-inline-block">
                    <div class="breadcrumb-wrapper col-12">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a><b>REPORTE CAPTURA DIARIA</b></a></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <section id="dom">
            <div class="row">
                <div class="col-4">
                    <div class="card">
                        <div class="card-content collapse show">
                            <div class="card-header bg-gradient-x-info" style="border-bottom: 1px solid rgb(216, 216, 216); box-shadow: rgb(34, 34, 34) 0px 3px 5px -6px;">
                                <h4 class="card-title text-white" id="file-repeater">Captura</h4>
                            </div>
                            <div class="card-body">
                                <div class="row">
                                    <div class="col-xl-12">
                                        <vue-multiselect :options="[]" placeholder="Seleccionar Cliente..."></vue-multiselect>
                                    </div>
                                </div>
                                <div class="form row">
                                    <fieldset class="form-group position-relative has-icon-left col-xl-6">
                                        <input type="text" class="form-control round" id="iconLeft10" placeholder="FECHA">
                                        <div class="form-control-position">
                                            <i class="la la-calendar info"></i>
                                        </div>
                                    </fieldset>
                                    <fieldset class="form-group position-relative has-icon-left col-xl-6">
                                        <input type="text" class="form-control round" id="iconLeft10" placeholder="EXPEDIENTES">
                                        <div class="form-control-position">
                                            <i class="la la-clipboard info"></i>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    `,
};

let app = createApp({
     data() {
         return {
             message: 'Hello !'
         };
     },
     mounted(){},
     components: {
         'component-captura':componentCaptura
     },
     });
    app.mount('#app');

</script>

HTML

<div class="content-wrapper" style="padding-top: 0px;">
   <div class="content-body">
        <div id="app">
            <component-captura></component-captura>
        </div>
   </div>
</div>

The issue seems to be related to the vueselect component triggering the warnings and errors.

If you have any insights on how to address this problem, please share.

CONSOLE WARNINGS AND ERRORS:

vue.global.js:1616 [Vue warn]: Property "$createElement" was accessed during render but is not defined on instance. 
    at <VueMultiselect options= [] placeholder="Select Client..." > 
    at <Anonymous> 
    at <App>
warn$1 @ vue.global.js:1616
(anonymous) @ VM5920:2185
Show 35 more frames
vue.global.js:1616 [Vue warn]: Property "_self" was accessed during render but is not defined on instance. 
    at <VueMultiselect options= [] placeholder="Select Client..." > 
    at <Anonymous> 
    at <App>

Show 35 more frames
vue.global.js:1616 [Vue warn]: Unhandled error during execution of render function 
    at <VueMultiselect options= [] placeholder="Select Client..." > 
    at <Anonymous> 
    at <App>

Show 35 more frames
vue.global.js:1796 Uncaught TypeError: Cannot read properties of undefined (reading '_c')
    at Proxy.i (<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1e686b7b33736b728202876ce38785838e868d93778388878988">[email protected]</a>:1:36878)

To provide further insight into my issue, I've included the console log details above.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Ways to position cursor at the end in the Froala Editor

My current dilemma involves the need to position the focus/cursor at the end of text that is loaded within the Froala editor. I attempted to accomplish this using the focus event of Froala (events.focus), but unfortunately, it did not yield the desired out ...

What is the proper way to safely close the pg-promise connection in a node.js environment once all jest tests are completed?

I am facing a challenge in closing a PG-Promise database connection after running a function test in Jest. The database connection is initialized in one central location (db.js) and required in multiple places. In this scenario, it is being used by seed.j ...

What is preventing Javascript from executing a function when there is an error in another function?

Can you explain why a JavaScript function fails to run if there is an error in another function? Recently, I encountered an issue on my HTML page where the alert from the popup1() function would not load. It turns out the problem stemmed from an error in ...

Duo and reference loop

I'm trying to learn how to use backreferences in JavaScript. I have an array and want to replace it within a string. Here's what I've attempted so far: var items = ["book", "table"]; var sentence = "The $1 is on the $2"; var newSentence ...

Ways to navigate the user to various screens

I'm currently developing an app that navigates users to various sections using Vue 3 and the Vue router. However, I'm facing a challenge in displaying different pages. When trying to show a new page, it doesn't display as expected. It seems ...

Getting to a nested key in a JSON object with JavaScript: a step-by-step guide

Currently, I'm working with a JSON file and need to extract the fileName tag for use. { "dataset": { "private": false, "stdyDscr": { "citation": { "titlStmt": { "titl": "Smoke test", "IDNo": ...

Leveraging the "dialogclose" event within jQuery Mobile

Is there a way to change an image once it is clicked and change back when the dialog it links to is closed? I found a potential solution on this site, but after modifying it for my needs, it doesn't seem to work. Can anyone help me figure out what I a ...

Displayable components within choices in a dropdown menu

Is it possible to dynamically update select options based on the visibility of elements in the DOM that are controlled by v-if? The current code I have does not seem to be updating the options as elements are hidden. <select class="form-control-sm fl ...

What steps can I take to resolve the Angular JS error message: [$injector:unpr]?

index.html <!DOCTYPE html> <html lang="en" ng-app="myApp"> <head> <meta charset="UTF-8"> <title>Angular JS</title> <script src="lib/angular.min.js"></script> ...

When refreshing a page in Next.js, the loading indicator does not properly turn off

I'm currently working on my portfolio using next.js and I have implemented a 'loading' state to prevent displaying partially loaded gallery images. The 'loading' state should turn off (set to 0) once all the photos are fully loaded ...

Adjust the dimensions of input tag depending on the length of content in Angular

Is there a way to dynamically set the size of the input tag in my HTML based on the length of the ng-model value? I attempted this approach: <span>Node Path: <input for="nodeName" type="text" ng-model="nodePath" size="{{nodePath.length()}}"ng- ...

When using vue.js(2), the function window.scrollY consistently returns a value of 0

Here are some issues I'm experiencing with vuejs and router: The window.addEventListener('scroll', ...) is not being detected in my component. When I enter 'window.scrollY' in console.log, it always returns 0 to me. Scroll(Y) is w ...

Top method for organizing an array based on an object's property and displaying the outcome

I encountered a problem for which I couldn't find an immediate solution. I have an array of objects representing products, with each product having a category property. My goal is to group these products by their categories. After some trial and error ...

assigning a variable using jQuery

<script> function update(elem) { var ele=$(elem).siblings('label#test').html(); var a=document.getElementById('test'); var htm = '<input type="text" name="modal" id="modal" style="width:70%;" value="'+$(elem).siblings ...

Troubleshooting app.use in Next.js and express.js: Understanding the issue

Currently, I am working on a project using next.js along with a custom server (express.js). In my API endpoints, I want to utilize some middlewares (such as const attachUser), but strangely I am facing issues when trying to use app.use. The code seems to ...

Use jQuery to retrieve the response from a JSON request and showcase it on the existing HTML page

Currently, I am working on a project that involves integrating a JSON-based web service from a remote server. The method of this service can be accessed by using specially formatted URLs such as: http://root-url/ws/service-name?request={json-string} The ...

Tips for Using VueComponent with the $vuetify.goTo() Function

I have three view components named home, about, and work in the App.vue file. <v-app> <ToolBar /> <v-content> <router-view name="home"></router-view> <router-view name="about"></router-view> ...

updating rows in a table

Currently, I have a grid array filled with default data retrieved from the database. This data is then displayed on the front end in a table/grid format allowing users to add and delete rows. When a row is added, I only want to insert an empty object. The ...

What causes the DOM to be updated upon each opening of the browser extension for Chrome?

Here is the default position: https://i.stack.imgur.com/tkWCA.png After checking it: https://i.stack.imgur.com/tdzbg.png When I click anywhere on the page to hide the dom extension output (without showing popup.html); However, when I reopen the extens ...

Trigger a jQuery click event to open a new tab

On a public view of my site, there is a specific link that can only be accessed by authenticated users. When an anonymous user clicks on this link, they are prompted to log in through a popup modal. To keep track of the clicked link, I store its ID and inc ...