This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.
Setting an empty string instead of null or empty object when editable is false #3176
Closed
Description
When the user clears the input field, the parser returns an empty string instead of null. This may cause problems when the controller expects the ng-model to be an object.
I fixed this changing the line 3719, inside the parser function:
if (!inputValue) {
// Reset in case user had typed something previously.
// An empty string is not always the best value to return
modelCtrl.$setValidity('editable', true);
return null;