question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fxShow does not seem to work with custom breakpoints

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Custom breakpoints should respect fxShow and fxHide

What is the current behavior?

Only fxHide works

What are the steps to reproduce?

https://stackblitz.com/edit/flexlayout-h9m1hc

The behaviour can be observed by changing the width of the rendered page. As you reduce the width the header at the top will change to MobilePortrait. At this point I expect this section of my HTML (within app.component.html) to be displayed:

<section 
    fxHide 
    fxShow.mobile.portrait="true"> 
  fxShow.mobile.portrait
</section>

However, all my sections which hide their content by default and only show when the specific media query matches do not seem to be working.

The opposite seems to work - i.e all sections that are shown by default but only hidden when the specific media query matches work as expected.

What is the use-case or motivation for changing an existing behavior?

I want to be able to use my custom breakpoint directives for both showing and hiding certain elements on the page.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 6.0.3 Material 6.2.0 macOS High Sierra v10.13.4 Chrome Version 66.0.3359.181 (Official Build) (64-bit)

Is there anything else we should know?

I don’t think so

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Mufasacommented, Dec 2, 2018

@CaerusKaru Strike my last line in my previous comments. I had not set my browser window to the correct aspect ratio for mobile.portrait to be fired.

Everything is now working - fxShow/Hide all working as expected.

Many thanks for fixing this.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show/Hide using custom breakpoints and angular/flex-layout
I'm trying to use custom breakpoints with every directive provided by @angular/flex-layout. I have added custom breakpoints:
Read more >
angular/flex-layout - Gitter
Unfortunately there's no good way to do consolidation, especially when you consider custom breakpoints. We might be able to optimize, but worst case...
Read more >
Angular Flex layout - Directives with defined Inputs are not ...
Hi,. if I'm not wrong, from 8.x.x version of Flex-Layout (https://github.com/angular/flex-layout/) is possible to extend directives with custom breakpoints ...
Read more >
You might not need Angular Flex-Layout
fxShow and fxHide, Use block and hidden classes ; Responsive API · Override Tailwind's default breakpoints to match with Angular Flex-Layout. For ...
Read more >
Angular 6 Custom BREAKPOINTS Demo - YouTube
Angular 6 - Creating a custom BREAKPOINT using FlexLayout. ... try restarting your device. Your browser can ' t play this video.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found