-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFC #324 : Deprecate
Component#isVisible
- Loading branch information
1 parent
9f05034
commit 372b1ac
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
id: ember-component.is-visible | ||
title: Deprecate `Commponent#isVisible` | ||
until: '4.0.0' | ||
since: '3.15' | ||
--- | ||
|
||
We are deprecating usage of the `isVisible` in classic components in accordance with [RFC #324](https://github.com/emberjs/rfcs/blob/master/text/0324-deprecate-component-isvisible.md). | ||
|
||
Instead of setting thee `isVisible` property on classic components, consider either using a wrapping `{{#if}}` or the [`hidden` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden: | ||
|
||
```hbs | ||
{{! wrapping `if` }} | ||
{{#if this.showComponent}} | ||
<MyComponent /> | ||
{{/if}} | ||
{{! hidden attribute }} | ||
<div hidden={{this.isHidden}}></div> | ||
``` | ||
|