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

Is there a way to change the default value of the onCreate callback function? #665

Closed
jiniC opened this issue Aug 6, 2021 · 1 comment
Closed

Comments

@jiniC
Copy link

jiniC commented Aug 6, 2021

because of this issue : #663
I would like to put this bugfix function as the defaults property of onCreate.
Due to the circumstances of the project, I can't call a function for fixing bugs with onCreate callbacks everywhere I am creating mCustomScrollbar.
onCreate callbacks everywhere I am creating mCustomScrollbar.
Is there a way to make this bugfix function default to the onCreate function, other than by modifying the library script itself?

I tried this method,

$.mCustomScrollbar.defaults.callbacks.onCreate = function () { mCustomScrollbarBugFix(this); };

but it didn't work because the onCreate function was replaced after the mCustomScrollbar was created and already tried to call the onCreate function. Also, this method was not possible because I had to go through all the mCustomScrollbars and pass the appropriate arguments.

Is there any other way?

@jiniC
Copy link
Author

jiniC commented Aug 8, 2021

I have sent pr to solve this problem fundamentally : #666

@jiniC jiniC closed this as completed Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant