-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expressions refactoring + attribute expression value check
- Loading branch information
Showing
6 changed files
with
107 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import normalizeStringValue from '../util/normalize-string-value.js' | ||
|
||
/** | ||
* This methods handles the input fields value updates | ||
* @param {HTMLElement} node - target node | ||
* This method handles the input fields value updates | ||
* @param {Object} expression - expression object | ||
* @param {HTMLElement} expression.node - target node | ||
* @param {*} expression.value - old expression value | ||
* @param {*} value - new expression value | ||
* @returns {undefined} | ||
*/ | ||
export default function valueExpression(node, expression, value) { | ||
node.value = normalizeStringValue(value) | ||
export default function valueExpression({ node, value: oldValue }, value) { | ||
if (oldValue !== value) node.value = normalizeStringValue(value) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters