Git Product home page Git Product logo

material-ui-cron's People

Contributors

baymac avatar shirasawasama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

material-ui-cron's Issues

Add @emotion/react @emotion/styled as dependency

Describe the bug
@emotion/react @emotion/styled should be added to dependency now that we have moved to material-ui/core-5.0.0-beta.1

To Reproduce
Steps to reproduce the behavior:

  1. Create a new cra project
  2. Run command yarn add [email protected]
  3. Add scheduler component in App.js
  4. Run dev server yarn start

Server throws error

./node_modules/@material-ui/styled-engine/index.js
Module not found: Can't resolve '@emotion/react' in '/path/to/dir/test/my-app/node_modules/@material-ui/styled-engine'

Solution
Add @emotion/react @emotion/styled to dependencies list.

Gives error to "0 1/4 * * *"

Hi, so I have this expression "0 1/4 * * *" that throws an error.
But I see you are using cronstrue package that translates the value correct cronstrue.toString('0 1/4 * * *');

Changing cron prop does not rerender component

Describe the bug
I'm retrieving a cron from a database, and want to update the value of the cron to the value I get from the database.
When the response is retrieved from the database, the values of the component are not updated to the value of the new 'cron' prop.

Steps to reproduce
Demo here: https://codesandbox.io/s/material-ui-cron-stable-forked-5r89pd

Render component with:

const CronGenerator = (props) => {
    const [cron, setCron] = useState("30 9 * * 1")
    setTimeout(() => setCron("* * * * *"), 2000)


    return (
            <SchedulerRoot cron={cron}
                           setCron={updateCron}
                           setCronError={() => {}}
                           isAdmin={true}
                           />
    );
}

The component does not refresh to reflect the new value. I've included a picture to show that the props in React Component profiler are different to that actually displayed.

Screenshot from 2022-07-11 19-32-22

Note that I'm having to use the SchedulerRoot component due to an error when rendering just the <Scheduler /> component (image of the error below). However, note that in the demo linked at the top of this post, the same problem exists.

image

Solution (optional)

Additional context (optional)

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.