@stimulus-components/checkbox-select-all
Version:
A Stimulus controller for managing checkbox lists.
25 lines (24 loc) • 947 B
TypeScript
import { Controller } from "@hotwired/stimulus";
export default class CheckboxSelectAll extends Controller {
readonly hasCheckboxAllTarget: boolean;
readonly checkboxTargets: HTMLInputElement[];
readonly checkboxAllTarget: HTMLInputElement;
readonly disableIndeterminateValue: boolean;
static targets: string[];
static values: {
disableIndeterminate: {
type: BooleanConstructor;
default: boolean;
};
};
initialize(): void;
checkboxAllTargetConnected(checkbox: HTMLInputElement): void;
checkboxTargetConnected(checkbox: HTMLInputElement): void;
checkboxAllTargetDisconnected(checkbox: HTMLInputElement): void;
checkboxTargetDisconnected(checkbox: HTMLInputElement): void;
toggle(e: Event): void;
refresh(): void;
triggerInputEvent(checkbox: HTMLInputElement): void;
get checked(): HTMLInputElement[];
get unchecked(): HTMLInputElement[];
}