Giter VIP home page Giter VIP logo

Comments (5)

fzaninotto avatar fzaninotto commented on April 28, 2024

You're right, #9503 seems to have broken the old behavior, sorry about that.

You can fix it on your side by setting the light and dark themes in the <Admin> component. As for changing the theme, yes it's possible (you can see an example in the e-commerce demo.

const [themeName] = useStore<ThemeName>('themeName', 'soft');
const lightTheme = themes.find(theme => theme.name === themeName)?.light;
const darkTheme = themes.find(theme => theme.name === themeName)?.dark;

It is indeed a breaking change and we should fix it in 4.16. However, there is a workaround, passing a theme object in useTheme won't be supported in 5.x, and fixing it in master then backporting the changes to next will break next.

So I'm -1 for fixing this bug.

from react-admin.

nihauc12 avatar nihauc12 commented on April 28, 2024

heyo, no worries, thx for the quick answer and workaroung

from react-admin.

jjsmclaughlin avatar jjsmclaughlin commented on April 28, 2024

I think you need to bear in mind that people installing Symfony / api-platform from the docs at present end up with a broken system: https://stackoverflow.com/questions/77840771/error-while-generate-an-admin-interface-using-api-platform-admin-and-react-admin and a component used with just an entrypoint property, as should work, errors out the whole app.

from react-admin.

fzaninotto avatar fzaninotto commented on April 28, 2024

This seems to be fixed in API Platform v3.4.6, can you confirm?

https://github.com/api-platform/admin/releases/tag/v3.4.6

from react-admin.

jjsmclaughlin avatar jjsmclaughlin commented on April 28, 2024

I can confirm. Great. Thanks. Please disregard my comment and thanks for fixing it.

from react-admin.

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.