mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-28 18:20:42 +00:00
fix: change detection parameter for callback for edit on click
This commit is contained in:
parent
f8aa235cb4
commit
3d0cfc8698
1 changed files with 4 additions and 8 deletions
|
|
@ -81,7 +81,8 @@
|
|||
}
|
||||
|
||||
const curVal = el.html();
|
||||
const isChanged = lastVal !== curVal;
|
||||
const isChanged = (lastVal !== curVal);
|
||||
|
||||
if (angular.isFunction(scope.editOnClickOnEditFinished)) {
|
||||
scope.editOnClickOnEditFinished({
|
||||
isChanged,
|
||||
|
|
@ -90,19 +91,14 @@
|
|||
event,
|
||||
});
|
||||
}
|
||||
lastVal = curVal;
|
||||
}
|
||||
|
||||
function read() {
|
||||
let curVal = el.html();
|
||||
// strip tags
|
||||
curVal = removeTags(curVal);
|
||||
|
||||
const isChanged = lastVal !== curVal;
|
||||
|
||||
if (isChanged) {
|
||||
ngModel.$setViewValue(curVal);
|
||||
lastVal = curVal;
|
||||
}
|
||||
ngModel.$setViewValue(curVal);
|
||||
}
|
||||
|
||||
ngModel.$render = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue