Skip to content

Commit 3956ee4

Browse files
Add emtpy value checks to update behavior (#12)
1 parent a7d4a22 commit 3956ee4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/jquery.submitable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666
let enable = true;
6767
if (this.options.strategy === $.fn.submitable.strategy.UPDATE) {
6868
enable = this.computeValues() !== this.options.defaultValues;
69-
} else if (this.options.strategy === $.fn.submitable.strategy.NOT_EMPTY) {
69+
}
70+
71+
if (this.options.strategy === $.fn.submitable.strategy.NOT_EMPTY || (enable && $.fn.submitable.strategy.UPDATE)) {
7072
this.$element.find(":input[required]:not([type=hidden]):not([disabled]), select[required]:not([disabled]), radio:not([disabled])").each((index, element) => {
7173
if (element.value === '') {
7274
enable = false

0 commit comments

Comments
 (0)