Bug with datetime and dependent

Bug with datetime and dependent

Loren MaxwellLoren Maxwell Posts: 488Questions: 120Answers: 10

(I still haven't mastered making an example with Editor :/)

When I use a datetime and have a dependent on it:

.dependent('datetime_field', function (val, data, callback, e) {
    console.log('Do something here')
    return true
})

I always get this error when the Editor initially opens:

Uncaught TypeError: Cannot read properties of undefined (reading 'length')

It goes away after that first time even if I open the Editor again.

I haven't tested it otherwise, but I'm opening the Editor with e-edit:

editor.edit( row, opts);

Answers

  • allanallan Posts: 65,610Questions: 1Answers: 10,909 Site admin

    Best bet for Editor is to start with this template for local editing.

    I'm not actually getting an error when using your dependent call: example. Did I miss something?

    Allan

  • Loren MaxwellLoren Maxwell Posts: 488Questions: 120Answers: 10

    Thanks, @allan -- I've bookmarked the template for the future!

    And hmmm... I'll dig through my code then. I must have something else that triggers that, but I thought I had already eliminated everything else.

    I'll troubleshoot more and report back if needed!

    As always, thanks for the excellent support!

  • allanallan Posts: 65,610Questions: 1Answers: 10,909 Site admin

    What's the backtrace from the error?

    Allan

Sign In or Register to comment.