Giter Site home page Giter Site logo

Javascript Uncaught TypeError: Cannot read property 'comboBox' of undefined at Object.initLazy (multiselectComboBoxConnector.js?ec3f:33) about multiselect-combo-box-flow HOT 9 CLOSED

gatanaso avatar gatanaso commented on July 17, 2024
Javascript Uncaught TypeError: Cannot read property 'comboBox' of undefined at Object.initLazy (multiselectComboBoxConnector.js?ec3f:33)

from multiselect-combo-box-flow.

Comments (9)

gatanaso avatar gatanaso commented on July 17, 2024 1

Hi @urkl

Thank you for reporting this issue. It looks like the component hasn't been initialized properly after doing a page refresh. Would it be possible that you provide a minimal reproducible example that I could look into more closely?

from multiselect-combo-box-flow.

urkl avatar urkl commented on July 17, 2024 1

Hi Goran.

Here you go. https://gitlab.com/uros.kristan/multi-select-field-test

I found out that the problem occurs in conjunction with app-layout addon.

To reproduce the problem please follow this steps:

  • run project
  • click on Multi Select in menu
  • select some items
  • refresh browser window

And another question: Would it be possible to implement onItemClickListener for selected items. Not on x sign to remove them, but directly on item?

from multiselect-combo-box-flow.

gatanaso avatar gatanaso commented on July 17, 2024 1

Hi @urkl

I have been able to workaround this issue by modifying the connector code to execute once the element is defined. There is a new version available that includes this fix 2.2.1.rc1.

Could you please test with this version and let me know if it fixes the issue:

<dependency>
   <groupId>org.vaadin.gatanaso</groupId>
   <artifactId>multiselect-combo-box-flow</artifactId>
   <version>2.2.1.rc1</version>
</dependency>

BR,
Goran

from multiselect-combo-box-flow.

urkl avatar urkl commented on July 17, 2024 1

Goran! It works. Thank you!
I think that you even fixed issue posted on vaadin directory by Muhammad Faisal.

Best Regards, UroΕ‘!

from multiselect-combo-box-flow.

gatanaso avatar gatanaso commented on July 17, 2024

Hi @urkl

Thank you for providing the project, I will have a look at the issue.

Regarding the onItemClickListener, I think it would be possible to add such functionality.

from multiselect-combo-box-flow.

gatanaso avatar gatanaso commented on July 17, 2024

I think the issue happens because the initLazy() method of the connector is executed before the ready() method of the component. Therefore, the component is not yet initialized and these errors occur.

Found a similar issue here: https://github.com/vaadin/vaadin-grid-flow/issues/586

from multiselect-combo-box-flow.

urkl avatar urkl commented on July 17, 2024

This is not good news if I understand this correctly. Bug from Vaadin is from March.

from multiselect-combo-box-flow.

gatanaso avatar gatanaso commented on July 17, 2024

Yes, unfortunately there has not been a lot of activity on that ticket.
Have you tried using the MultiselectComboBox in an app without the app layout add-on?
From what I have briefly tested, when used without the app layout add-on there are no issues at all as the initialization order is preserved.

from multiselect-combo-box-flow.

urkl avatar urkl commented on July 17, 2024

Do you know for a way to override this annoying bug ?
Bug happens when opening in new browser window.

from multiselect-combo-box-flow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.