You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -479,21 +476,61 @@ You can also pass `true` to `@sizesHeight`, which will enable default sizes. The
479
476
480
477
### Disabling
481
478
482
-
Pass a truthy value into `isDisabled`(modifier) or `@isDisabled` (component) to disable element query functionality:
479
+
Pass a truthy value into `isDisabled` to disable element query functionality:
483
480
484
-
```
481
+
```html
485
482
<img
486
483
{{element-query@isDisabled=true}}
487
484
>
488
485
```
489
486
490
-
```
487
+
```html
491
488
<ElementQuery
492
489
@isDisabled={{true}}
493
490
>
494
491
</ElementQuery>
495
492
```
496
493
494
+
⚠ This property is intended for debugging purposes or disabling element queries entirely. If you change `isDisabled` to `true` dynamically, element query attributes will freeze in their current state, there is no cleanup.
495
+
496
+
497
+
498
+
### FastBoot fallback
499
+
500
+
Unfortunately, FastBoot does not have information about user's screen size. When a user vistis a FastBoot-driven website, they initially see a page without any `ember-element-query` attributes. When FastBoot rehydrates, element queries kick in. As a result, page layout may suddenly change after the user has already started reading and scrolling, causing frustration.
501
+
502
+
One workaround is to use [ember-useragent](https://github.com/willviles/ember-useragent). Its `isMobile`, `isTablet` and `isDesktop` boolean properties let you apply defaults. The result is very crude but better than nothing.
503
+
504
+
Since reusable components can be used in different contexts, it is recommended that you apply the fallback on parent level.
Unfortunately, this requires the parent to know which attributes are used in component's CSS, since providing all possible attributes would be quite tedious, especially for default sizes, which are numerous.
0 commit comments