Skip to content

Commit

Permalink
fix: typos and not enabled status for tristate
Browse files Browse the repository at this point in the history
Refs:  #40
  • Loading branch information
palcarazm committed Jul 21, 2022
1 parent 6d45383 commit f810b2b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions js/bootstrap5-toggle.ecmas.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
}

indeterminate(silent = false) {
if(!this.options.tristate) return false;
if (!this.options.tristate || this.element.disabled || this.element.readOnly) return false;
this.ecmasToggle.classList.add('indeterminate');
this.element.indeterminate = true;
this.element.removeAttribute('name');
Expand All @@ -240,12 +240,12 @@
}

determinate(silent = false) {
if(!this.options.tristate) return false;
if (!this.options.tristate || this.element.disabled || this.element.readOnly) return false;
this.ecmasToggle.classList.remove('indeterminate');
this.element.indeterminate = false;
if(this.options.name) this.element.setAttribute('name', this.options.name);
if(this.invElement) target.invElement.indeterminate = false;
if(this.invElement && target.options.name) this.invElement.setAttribute('name', this.options.name);
if(this.invElement) this.invElement.indeterminate = false;
if(this.invElement && this.options.name) this.invElement.setAttribute('name', this.options.name);
if (!silent) this.trigger()
}

Expand Down
2 changes: 1 addition & 1 deletion js/bootstrap5-toggle.ecmas.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f810b2b

Please sign in to comment.