stimulus-checkbox-select-all icon indicating copy to clipboard operation
stimulus-checkbox-select-all copied to clipboard

Add disable indeterminate logic

Open lopez-marc opened this issue 1 year ago • 2 comments

Proposal: Add 'disableIndeterminate' logic

Background

The current Component allows for three states for the "checkbox all": checked, unchecked, and indeterminate. However, some users may want to disallow the indeterminate state, and there's currently no built-in way to do this.

Proposal

To address this need, I propose adding a new boolean value called disableIndeterminate. By default, this property would be set to false, allowing for the usual behavior of the Component.

However, if the user sets disableIndeterminate to true, like follows: data-checkbox-select-all-disable-indeterminate-value="true" the "checkbox all" will no longer have the indeterminate state.


I hope it's okay that I'm submitting a proposal via this pull request. I recently extended the behavior of your component for a project I'm working on, and I believe that my changes could be useful for other users.

I'm looking forward to hearing your thoughts on my proposal.

Best regards,

Marc López

lopez-marc avatar Mar 31 '23 10:03 lopez-marc