AngularJS + ngHandsontable Custom Validator not working when table columns created in util class

Tags: #<Tag:0x00007efc6237bc38>

I’m trying to use the Handsontable validator to validate data entry into a cell of one column. By convention, according to the ngHOT documentation, you do so via adding an entry to the hot-column like validator: ctrl.customValidator (see: http://handsontable.github.io/ngHandsontable/demo/index.html#/other-custom-validator, look in the HTML for how it’s being set). My issue is that this won’t work for my system as it doesn’t work when you’re creating the columns in a different class (in my case, a util class that does some data manipulation) and assigning the columns via the columns field like you see in the JS file in the link. Is there an easier way to work with this, or should I instead use afterChange to handle the validation?

Note: the validation contains a service call to pull some data from the db to validate against. Not sure if that makes any difference.1

Hi @johnothetree

we did not update the ngHandsontable for a long time. It may not work with newer version. Especially versions above 1.11.0 where we switched from Traceur to Babel.

Please share a demo where the issue can be replicable.

Hi @johnothetree

There’s more than a week without any update. Did you manage to fix the issue @johnothetree?