Topic: MDB 5 Pro Installation

ludmarketingllc premium asked 6 months ago


I installed MDB 5 Vue UI kit and as mentioned in the installation guide.
1. Downloaded the package 2. ran 'npm install' to get the kit installed 3. ran import * as mdb from 'mdb-vue-ui-kit' 4. Tried using Autocomplete and Lazy image load as indicated in the guide but can't seem to get it right

After loading the page on the browser I get an error saying Autocomplete is not a constructor.

Did I install it wrong? Pretty confused as to how to get the Pro stuff working.

Help? Thanks :)

import * as mdb from 'mdb-vue-ui-kit';
const asyncAutocomplete = document.querySelector('#async');
const asyncFilter = async (query) => {
  const url = `https://swapi.py4e.com/api/people/?search=${encodeURI(query)}`;
  const response = await fetch(url);
  const data = await response.json();
  return data.results;
};

new mdb.Autocomplete(asyncAutocomplete, {
  filter: asyncFilter,
  displayValue: (value) => value.name
});

Mikołaj Smoleński staff answered 6 months ago


@ludmarketingllc you bought MDB Vue UI KIT, but use the Standard version code. Please check the dedicated Vue guide:

https://mdbootstrap.com/docs/vue/pro/installation/ https://mdbootstrap.com/docs/vue/forms/autocomplete/

Keep coding!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Premium
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 1.14.0
  • Device: Web
  • Browser: Brave
  • OS: Windows
  • Provided sample code: Yes
  • Provided link: No