Ability to check if a field has already been rendered

I have a field in my page and I am overriding the handleChange method for the field with some fairly complex behavior.

Part of this behavior depends on the data in another model. So I need to be able to call the snippet that sets up my field when certain events are thrown.

The issue is right now, I am getting duplicate instances of the field (and the entire editor it belongs to for that matter - see attached screen grab).

I belive this is because I am calling render multiple times.

So what I need is logic to be able to tell if the field has been previously rendered or not, and only render the first time if that makes sense, and simply override the handleChange function otherwise.

Any help on this would be appreciated.

Never mind, got it sorted. It was not the multiple field.render() calls that was causing this.
I simply had been creating new rows in the model!

Mystery solved.

Thanks for letting us know, Hamza!