Error Description
The bootstrapToggle method incorrectly uses RENDERER as the method name when the documentation and actual implementation use rerender. This creates confusion for developers and requires referencing the source code to discover the correct method name.
Steps to Reproduce
const toggle = document.getElementById('my-toggle');
toggle.bootstrapToggle('rerender'); // Works as documented
toggle.bootstrapToggle('RENDERER'); // Also works (undocumented)
The enum exported in the TypeScript definitions includes RENDERER = "RENDERER", but the documented method name is "rerender" (lowercase). Both work due to case-insensitive handling, but the naming is inconsistent.
Expected Behavior
The method name should be consistently rerender (lowercase) in both documentation and TypeScript enums to match standard JavaScript conventions.
Actual Behavior
The TypeScript enum BootstrapToggleMethods defines RENDERER = "RENDERER" (uppercase), while the documented method uses "rerender". The inconsistency may lead developers to use the wrong case or assume the enum value is the correct string to pass.
Severity
Minimal
Bootstrap 5 Toggle Version
5.3.0
Bootstrap version
5.3.8
Other
This issue was discovered while implementing accessibility features in bs-darkmode-toggle, where we needed to call rerender after updating aria-label. The enum value RENDERER works but doesn't match the documentation.
Bug Report Checklist
Error Description
The
bootstrapTogglemethod incorrectly usesRENDERERas the method name when the documentation and actual implementation usererender. This creates confusion for developers and requires referencing the source code to discover the correct method name.Steps to Reproduce
The enum exported in the TypeScript definitions includes
RENDERER = "RENDERER", but the documented method name is"rerender"(lowercase). Both work due to case-insensitive handling, but the naming is inconsistent.Expected Behavior
The method name should be consistently
rerender(lowercase) in both documentation and TypeScript enums to match standard JavaScript conventions.Actual Behavior
The TypeScript enum
BootstrapToggleMethodsdefinesRENDERER = "RENDERER"(uppercase), while the documented method uses"rerender". The inconsistency may lead developers to use the wrong case or assume the enum value is the correct string to pass.Severity
Minimal
Bootstrap 5 Toggle Version
5.3.0
Bootstrap version
5.3.8
Other
This issue was discovered while implementing accessibility features in
bs-darkmode-toggle, where we needed to callrerenderafter updatingaria-label. The enum valueRENDERERworks but doesn't match the documentation.Bug Report Checklist