Topic: Autocomplete error
Oost pro asked 7 months ago
I just can't figure out why _input .offsetWidth isn't set. _input = null, the class is: form_control on the element i have set as documented
Error on element input. offset width mdb.umd.min.js at location: 321
_initDropdown() {
this._dropdownContainerId = this._element.id ? autocomplete-dropdown-${this._element.id}
: Jt("autocomplete-dropdown-");
const t = {
id: this._dropdownContainerId,
items: [],
width: this._input.offsetWidth,
options: this._options
};
It seems the _input doesn't get right set.
Kamila Pieńkowska staff answered 7 months ago
If the same code works in the snippet but not in your project then there is a problem with your local setup. How are you doing your imports? Do you use any bundler or framework?
Kamila Pieńkowska staff answered 7 months ago
Please create the snippet with code you use that result in this error. I need to see your code to provide a help.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 7.2.0
- Device: MacOS
- Browser: Chrome
- OS: Ventura 13
- Provided sample code: Yes
- Provided link: No