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

Additional API methods for navbar #117

Open
VizuaaLOG opened this issue Nov 26, 2020 · 0 comments
Open

Additional API methods for navbar #117

VizuaaLOG opened this issue Nov 26, 2020 · 0 comments
Assignees
Milestone

Comments

@VizuaaLOG
Copy link
Owner

Over the next few versions I think it would great to expand the API methods available, allowing certain settings to be changed at run time, rather than needing to recreate the component. The below are ideas for the navbar, any other ideas please just comment!

  • hideOnScroll(new_state: boolean) - Combines the enableHideOnScroll and disableHideOnScroll methods. Returns the current value if no parameter is provided
  • sticky(new_state: boolean) - Combines the enableSticky and disableSticky methods. Returns the current value if no parameter is provided.
  • stickyOffset(new_value: number) - Sets a new sticky offset for the navbar. Returns the current value if no parameter is provided
  • stickyShadow(new_state: boolean) - Sets if the shadow should be shown when sticky. Returns the current value if no parameter is provided.
  • hideOnScroll(new_state: boolean) - Sets if the navbar should hide on scroll. Returns the current value if no parameter is provided
  • hideOnScrollTolerance(new_value: number) - Sets the tolerance before the navbar will hide when scrolling. Returns the current value if no parameter is provided
  • trigger(event_name: string) - This will trigger the provided event on the alert instance. Note: This wouldn't be restricted to documented events, so could be used for handling custom events

Deprecations

  • enableHideOnScroll() - Replaced with hideOnScroll(true)
  • disableHideOnScroll() - Replaced with hideOnScroll(false)
  • enableSticky() - Replaced with sticky(true)
  • disableSticky() - Replaced with sticky(false)

New events

  • stuck - Called when the navbar sticks itself to the top of the window
  • unstuck - Called when the navbar unsticks itself
  • hide - Called when the navbar is hidden, only applies if the hide on scroll is set
  • show - Called when the navbar is shown, only applies if the hide on scroll is set

The current color property will be renamed to type to keep in line with other dismissable components, primarily the alert.

@VizuaaLOG VizuaaLOG self-assigned this Nov 26, 2020
@VizuaaLOG VizuaaLOG added this to the 0.13 milestone Jan 29, 2021
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

1 participant