Git Product home page Git Product logo

Comments (7)

Sharlaan avatar Sharlaan commented on June 30, 2024 2

Just released v1.6.0 including onMenuOpen, please check it.

But in your case, if your "50 selectfields" all share same data, or even only 5 different datasets, i would strongly encourage to avoid using onMenuOpen on each component.
Instead fetch your shared datasets on page load in componentDidMount, then reference each selectField with its corresponding dataset.
An alternative method would be to use cache, ie put your fetch method in onMenuOpen but include a check if dataset already exist in cache, if yes load it directly, otherwise make the server request.

from material-ui-superselectfield.

MaximilianPichler avatar MaximilianPichler commented on June 30, 2024

Hi!
I've implemented an onMenuOpen event. Check it out on my fork

from material-ui-superselectfield.

FDiskas avatar FDiskas commented on June 30, 2024

Nice fork, could you please make a release to npm... 🎴

from material-ui-superselectfield.

TarikHuber avatar TarikHuber commented on June 30, 2024

There is already one: material-ui-selectfield
We are using it in production.

from material-ui-superselectfield.

FDiskas avatar FDiskas commented on June 30, 2024

Thanks

from material-ui-superselectfield.

FDiskas avatar FDiskas commented on June 30, 2024

tried onMenuOpen to fetch data - with no luck. On first click dropdown is not opened, but on second is ok works. Can you add an example of async data?

from material-ui-superselectfield.

FDiskas avatar FDiskas commented on June 30, 2024

So how I should do to prevent user to click on dropdown twice to see the actuals results
ezgif com-optimize 2

from material-ui-superselectfield.

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.