Skip to content

Dynamically enable disable or show and hide grid footer with ng binding #1792

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

Closed
atul221282 opened this issue Oct 13, 2014 · 6 comments
Closed
Assignees
Milestone

Comments

@atul221282
Copy link

Hi,

I have assigned scope variable to showFooter property changing scope variable doesn't show and hide or grid footer.

Or is there anyway we can enable and disable grid footer

@novice3030
Copy link
Contributor

seems like we might be missing a watch on that option

@PaulL1
Copy link
Contributor

PaulL1 commented Oct 18, 2014

I think the problem here is that gridOptions creates a shallow copy of the original options object. So anything in the options that is a reference (functions, arrays etc) will update automatically when the options are updated, but anything that is a single value (booleans for example) never get updated.

I'm looking into linking directly to the options, and then defaulting any missing values. I think that would resolve this issue.

@atul221282
Copy link
Author

Thanks Paul for looking into this will wait for ur reply meanwhile I am using twitter bootstrap paging.

@PaulL1
Copy link
Contributor

PaulL1 commented Oct 18, 2014

@atul221282 : you may want to pull and build this and see if it resolves your issue. I updated the footer tutorial to have a button to toggle footer, and seems to be working for me.

@PaulL1 PaulL1 closed this as completed in 650f27b Oct 23, 2014
PaulL1 added a commit that referenced this issue Oct 23, 2014
Fix #1792(options): use gridOptions rather than copy them
@raulcesar
Copy link

Hello Paul,

I am trying to alter the "enableFiltering" option dynamically, and had run into this issue. When I saw your fix, I was hopeful that it would solve my problem, but alas, the problem persists. Note that when I try changing the "showFooter" option, all is well. Does the enableFiltering option require something else to be able to work dynamically?

I replicated the problem in the plunker below by using the example code from the "footer example" and just adding another button, but using the "enableFiltering" property.

http://plnkr.co/edit/jrykh9?p=preview

@PaulL1
Copy link
Contributor

PaulL1 commented Oct 24, 2014

Yeah, the filters don't use an ng-if/ng-show type logic, so they're not dynamic. They need a watch, which I've been getting around to building but haven't yet. See this issue: #1819.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants