Skip to content

Inherited .disabled on every control - #42

Merged
colemancda merged 2 commits into
masterfrom
feature/disabled-controls
Jul 23, 2026
Merged

Inherited .disabled on every control#42
colemancda merged 2 commits into
masterfrom
feature/disabled-controls

Conversation

@colemancda

Copy link
Copy Markdown
Member

Completes .disabled: an inherited (container-level) .disabled(true) now disables every control in the subtree, not just Button.

What changed

  • Added a @Composable ViewNode.isEnabled() helper (!own disabled && !inherited disabled).
  • Applied enabled = node.isEnabled() to Button, Toggle (Switch), Slider, TextField, Stepper (± buttons), Picker (trigger), Menu (trigger), and DatePicker (trigger).

Verification

  • Emulator (Styling screen, "Inherited disabled" example): a .disabled(true) container now dims and blocks its Button, Toggle, Slider, and TextField (previously only the Button); the tap counter stays 0.

@colemancda
colemancda merged commit f7ee050 into master Jul 23, 2026
6 checks passed
@colemancda
colemancda deleted the feature/disabled-controls branch July 23, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant