Refactor disabled getter (remove ember/runloop & fix no-side-effects)
#1064
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The intention for the next major release is to remove all legacy Ember APIs.
Previously, the
disabledgetter relied onember/runloop. Additionally, it updated state during computation, which has long been considered an anti-pattern (ember/no-side-effects).Since this release already introduces breaking changes, the code has been refactored to use modern Ember patterns.
Breaking change impact
In general, this change should not be breaking for most applications or common usage patterns.
It only affects apps that:
disabledfromfalsetotrueHow to fix this in your app
Recommended solution
Use the trigger modifier. This is the preferred and supported approach.
Alternative solution
If using the trigger modifier is not possible, you must manually call:
after setting
disabled: truein your code.