Our pure JavaScript Scheduler component


Post by ktrinh »

Hi, I have experienced a problem with a rubber banding effect when trying to change the state of the schedule. I included the code and screenshot of the problem as a reference. Please let me know if I'm doing something wrong or need some clarification. Thanks

As attached, the datetime of the highlighted bar is not updated correctly (displayed as jan 26) but it is moved to the correct location (jan 19).

this cause a rubberband effect when the scheduler is interacted with where the highlighted batch is moved back to the 26th.

Thanks for having a look and any suggestion anyone might have!

    const scheduler = useRef(null);
    const [dataset, setDataset] = useState({...})
    const [file, setFile] = useState("")
    const [filemap, setFilemap] = useState([])

useEffect(() => {
    if (file === "") {
        setFile('production_list_cleaned.csv');
    }
    console.log("Updating File using: ", file)
    axios.get("/api/data", {params: {filename: file}}).then(response => {
        setDataset(response.data);
        setFilemap(response.data.onlyfiles);
    }).catch (err => console.log(err));

},[file]);
Attachments
Annotation 2022-01-25 103142.png
Annotation 2022-01-25 103142.png (145.21 KiB) Viewed 239 times

Post by mats »

Could you please attach a full runnable test case with all code so we can run / debug it?


Post Reply