Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CoCreate-app/CoCreate-attributes
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.5.39
Choose a base ref
...
head repository: CoCreate-app/CoCreate-attributes
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.40
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Aug 31, 2022

  1. Copy the full SHA
    5cbe978 View commit details
  2. chore(release): 1.5.40 [skip ci]

    ## [1.5.40](v1.5.39...v1.5.40) (2022-08-31)
    
    ### Bug Fixes
    
    * getValue and setValue using HTMLElement.prototype ([5cbe978](5cbe978))
    semantic-release-bot committed Aug 31, 2022
    Copy the full SHA
    409ef89 View commit details
Showing with 10 additions and 3 deletions.
  1. +7 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +2 −2 src/index.js
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.5.40](https://github.com/CoCreate-app/CoCreate-attributes/compare/v1.5.39...v1.5.40) (2022-08-31)


### Bug Fixes

* getValue and setValue using HTMLElement.prototype ([5cbe978](https://github.com/CoCreate-app/CoCreate-attributes/commit/5cbe9789de7e9028138893c8915c81060e8084f4))

## [1.5.39](https://github.com/CoCreate-app/CoCreate-attributes/compare/v1.5.38...v1.5.39) (2022-07-30)


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cocreate/attributes",
"version": "1.5.39",
"version": "1.5.40",
"description": "Simple HTML5 & JavaScript component add, update & remove values in element's attributes from input, select or js api. Easily configured using HTML5 attributes and/or JavaScript API.",
"keywords": [
"cocreate",
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -481,12 +481,12 @@ function setInputValue(input, value) {
crud: input.getAttribute('crud')
});
else
input.setValue(input, value);
input.setValue(value);
}

function getInputValue(input) {
if(!input) return;
let value = input.getAttribute('value') || input.getValue(input);
let value = input.getValue();
if (value) return value;
return false;
}