Giter Club home page Giter Club logo

Comments (5)

codeHul avatar codeHul commented on May 2, 2024 1

I found it. It wasn't in preact either it was me that used preacts register function wrong. I did the mistake of registering my component with {shadow: true} and seettig my shadowContainer to the shadow root of this newly registered element. If I do more like in mui example and register with {shadow: false} and then attach shadow contenler and append shadowRootElement it works. I will close this issue. Thanks for the help though. I appriciate it.

from material-ui.

codeHul avatar codeHul commented on May 2, 2024 1

I realized what I was doing wrong.

from material-ui.

imran-yasin avatar imran-yasin commented on May 2, 2024

@codeHul
Fixed check this link

The issue you're facing stems from the way the Slider components are being dynamically rendered with props. In React, when you dynamically render components in a loop, you need to ensure that each component has its own set of props.

In your code, you're using the same defaultValue and color props for all dynamically rendered Slider components. This results in all sliders having the same value and color.

To fix this issue, you need to ensure that each Slider component receives its own unique set of props. You can achieve this by accessing the specific properties of each dimensions object in the map function.

The dimensions variable inside the map callback represents each object in the dims array. Each dimensions object contains properties like color and defaultValue, which are used to customize the Slider components being rendered dynamically.

from material-ui.

codeHul avatar codeHul commented on May 2, 2024

Gosh. I feel stupid now. I can see the mistake in my example. I however did not do the same mistake in my real app and there I get just a skeleton and the styles remain in document head. My app is made in preact and unfortunately I made the example in react. Could it be a preact issue? I'll try to reproduce it.

from material-ui.

imran-yasin avatar imran-yasin commented on May 2, 2024

@codeHul Yes sure please share

from material-ui.

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.