Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Perfect scroll is not adjusting to the container content change. #13

Closed
vamsi-kaja opened this issue May 5, 2017 · 5 comments
Closed

Comments

@vamsi-kaja
Copy link

I did not find the option to update the perfect-scrollbar when the content of the container changes.

@feanor07
Copy link
Collaborator

feanor07 commented Oct 9, 2017

it seems better to define an action within perfect-scroll component to update internal Ps component and yield it in template. By this way; the users of the component will have to opportunity to trigger update whenever they need.

@sultaniman
Copy link
Owner

Awesome @feanor07 thanks!

@feanor07
Copy link
Collaborator

providing an action to be yielded seemed to be enabling only a limited usage (because the action yielded should only be available within the block usage of the contextual component); hence I decided to go with creating a mixin and providing relevant updatePerfectScroll method within the mixin. So that; injecting the mixin to the relevant construct such as component, controller, or router will be enough to perform an update via calling this.updatePerfectScroll directly. In order the mixin to control the perfect-scroll; lifeCycleEventOccurred event (triggered after initialization and before destroying of the perfect scroll) of the perfect-sroll must be handled by the lifeCycleEventOccurred action within the mixin. This means lifeCycleEventOccurred=(action 'lifeCycleEventOccurred') declaration is neeed within the template for the update to work. You can see relevant section (PerfectScrollController Mixin) of README for usage example.

@sultaniman
Copy link
Owner

Once this feature will be in master I can tag a new verson.
Thanks.

@feanor07
Copy link
Collaborator

we can close this now.

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

Successfully merging a pull request may close this issue.

3 participants