Skip to content

Commit

Permalink
fix: Fix bug in CheckboxSelectAllController preventing connect() from…
Browse files Browse the repository at this point in the history
… adding event listeners
  • Loading branch information
Sub-Xaero committed Feb 9, 2021
1 parent 31336f9 commit db577a9
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/checkbox_select_all_controller.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BaseController } from './base_controller';
export declare class CheckboxSelectAllController extends BaseController {
static targets: string[];
readonly hasCheckboxAllTarget: boolean;
readonly hasSelectAllTarget: boolean;
readonly selectAllTarget: HTMLInputElement;
readonly checkboxTargets: HTMLInputElement[];
private get checked();
Expand Down
2 changes: 1 addition & 1 deletion dist/checkbox_select_all_controller.d.ts.map

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

2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export { EmptyDomController } from "./empty_dom_controller";
export { EnableInputsController } from "./enable_inputs_controller";
export { FallbackImageController } from "./fallback_image_controller";
export { FormSaveController } from "./form_save_controller";
export { LightboxImageController } from "./lightbox_image_controller";
export { LazyBlockController } from "./lazy_block_controller";
export { LightboxImageController } from "./lightbox_image_controller";
export { LimitedSelectionCheckboxesController } from "./limited_selection_checkboxes_controller";
export { NestedFormController } from "./nested_form_controller";
export { PasswordConfirmController } from "./password_confirm_controller";
Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts.map

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

2 changes: 1 addition & 1 deletion dist/stimulus-library.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stimulus-library.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stimulus-library.modern.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stimulus-library.modern.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stimulus-library.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stimulus-library.module.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stimulus-library.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stimulus-library.umd.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/checkbox_select_all_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {BaseController} from './base_controller';
export class CheckboxSelectAllController extends BaseController {
static targets = ['selectAll', 'checkbox'];

declare readonly hasCheckboxAllTarget: boolean;
declare readonly hasSelectAllTarget: boolean;
declare readonly selectAllTarget: HTMLInputElement;
declare readonly checkboxTargets: HTMLInputElement[];

Expand All @@ -22,7 +22,7 @@ export class CheckboxSelectAllController extends BaseController {

connect() {
requestAnimationFrame(() => {
if (!this.hasCheckboxAllTarget) {
if (!this.hasSelectAllTarget) {
return;
}

Expand All @@ -33,7 +33,7 @@ export class CheckboxSelectAllController extends BaseController {
}

disconnect() {
if (!this.hasCheckboxAllTarget) {
if (!this.hasSelectAllTarget) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export {EmptyDomController} from "./empty_dom_controller";
export {EnableInputsController} from "./enable_inputs_controller";
export {FallbackImageController} from "./fallback_image_controller";
export {FormSaveController} from "./form_save_controller";
export {LightboxImageController} from "./lightbox_image_controller";
export {LazyBlockController} from "./lazy_block_controller";
export {LightboxImageController} from "./lightbox_image_controller";
export {LimitedSelectionCheckboxesController} from "./limited_selection_checkboxes_controller";
export {NestedFormController} from "./nested_form_controller";
export {PasswordConfirmController} from "./password_confirm_controller";
Expand Down

0 comments on commit db577a9

Please sign in to comment.