We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c01f4f9 + dc48045 commit 1f65c42Copy full SHA for 1f65c42
angularjs-autogrow.js
@@ -60,7 +60,7 @@
60
$scope.lineHeight = ($element[0].scrollHeight / $scope.attrs.rows) - ($scope.offset / $scope.attrs.rows);
61
$scope.maxAllowedHeight = ($scope.lineHeight * $scope.attrs.maxLines) - $scope.offset;
62
63
- $element[0].addEventListener('input', $scope.autogrowFn);
+ $scope.$watch($attrs.ngModel, $scope.autogrowFn);
64
65
/**
66
* Auto-resize when there's content on page load
@@ -71,4 +71,4 @@
71
}
72
73
}]);
74
-})();
+})();
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "angularjs-autogrow",
3
- "version": "0.2.0",
+ "version": "0.3.0",
4
"description": "AngularJS 1.x directive for auto-grow / auto-resize of textarea elements",
5
"main": "angularjs-autogrow.js",
6
"scripts": {
0 commit comments