Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selector fxHide.xs doesn't work #62

Closed
skined90 opened this issue Dec 23, 2016 · 10 comments · Fixed by #121
Closed

selector fxHide.xs doesn't work #62

skined90 opened this issue Dec 23, 2016 · 10 comments · Fixed by #121
Assignees
Labels
bug has pr A PR has been created to address this issue
Milestone

Comments

@skined90
Copy link

fxHide.[any-size] doesn't work (It doesn't hide an element)

@ThomasBurleson
Copy link
Contributor

@skined90 - please provide a CodePen or Plunkr to demonstrate the issue.

Meanwhile I will research on our end ;-).

@skined90
Copy link
Author

skined90 commented Dec 23, 2016

Here is the plunker https://plnkr.co/edit/h4ZSa0YI9QruCD5MFNDo?p=preview

The first div has a fxHide.xs but it doesn't hide when I resize screen to be smaller than 599px. You can try with any other suffix (sm, md, lg)

@ThomasBurleson
Copy link
Contributor

So you encountered a KNOWN bug #59.

The fix is to add the default API also with the responsive one(s):

<div fxHide="false"  fxHide.xs fxFlex="20">  fxFlex="20"  </div>

@ThomasBurleson
Copy link
Contributor

Refs #59

@ThomasBurleson ThomasBurleson added the has pr A PR has been created to address this issue label Dec 23, 2016
@ThomasBurleson ThomasBurleson added this to the v2.0.0-beta.1 milestone Dec 23, 2016
@ThomasBurleson ThomasBurleson changed the title fxHide doesn't work fxHide.xs doesn't work Dec 23, 2016
@ThomasBurleson ThomasBurleson changed the title fxHide.xs doesn't work selector fxHide.xs doesn't work Dec 23, 2016
@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Jan 2, 2017

Fixed in Angular SHA 881eb894b: will be available in Angular v4.0.0-beta.2.

@ThomasBurleson
Copy link
Contributor

Also liable in Angular v2.4.1

@ThomasBurleson
Copy link
Contributor

Reopening to add tests.

@netmikey
Copy link

I am using Angular 2.4.4 and flex-layout 2.0.0-beta.3 but it seems like this still isn't working.

I guess having to always use 2 attributes to simply hide an element for a given breakpoint isn't intended?

<span fxHide="false" fxHide.xs>Hide this on Phone only</span>

In this example, the need for fxHide="false" is unexpected.

Also, binding like the following still yields the known angular error (though it should have been fixed in Angular 2.4.2 according to the release notes?):

<span [fxHide.xs]="dynamicProperty">Maybe hide this on phone</span>

ThomasBurleson added a commit that referenced this issue Jan 21, 2017
* Many directive selectors were missing a `,` separator between then xs and gt-xs breakpoints
* fxShow, fxHide preserve and restore the element's original display CSS style
* added more tests standalone breakpoint selectors, disabled selectors, and deactivated mediaQueries

fixes #62, closes ##59.
@ThomasBurleson
Copy link
Contributor

@netmikey, @skined90 - Thx for the alert. You helped us discover another very subtle, hidden bug where the , was missing in many of the directive selector lists.

See Pull Request #121 for fixes.

@ThomasBurleson ThomasBurleson self-assigned this Jan 21, 2017
andrewseguin pushed a commit that referenced this issue Jan 24, 2017
* fix(fxHide,fxShow): fix standalone breakpoint selectors

* Many directive selectors were missing a `,` separator between then xs and gt-xs breakpoints
* fxShow, fxHide preserve and restore the element's original display CSS style
* added more tests standalone breakpoint selectors, disabled selectors, and deactivated mediaQueries

fixes #62, closes ##59.

* fix(api): add missing comma-delimiter in breakpoint selectors

* add test to use md breakpoint via `fxHide.md`

* fix(fxShow, fxHide): restore proper display mode when not active

The fxHide and fxShow should not change the display mode to 'flex'. Instead
the display mode (when not 'none') should be the default (=== 'block')
or the explicitly assigned display mode for that element.

Fixes #105.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug has pr A PR has been created to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants