You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a bug with the parameters activeClass and pagerClass. As soon as I define a custom class for pagerClass the activeClass wouldn't be rendered to the DOM. I'm not sure if this intended, however let's assume the following example:
The above example would not render 'sy-active abc' for the class, it would simply render no class attribute and no class.
Moreover, I noticed not the overwrite alone causes the issue. If just 'sy-pager' is defined for the pagerClass it works as expected. Only if you change to a non default value the activeClass wouldn't be rendered out.
Edit: I noticed it's not related to the default value. It's the blank in pagerClass which causes the issue. Just custom strings work but a blank within the pagerClass strips out the activeClass.
The text was updated successfully, but these errors were encountered:
Ok I'm already seeing what's the issue. It's not intended for multiple class attachments. The JS code is not prepared for that. In this case it does not replace blanks with "." or split everything after the blank out to get the correct selector rule(s). I would issue a pull request which fixes the problem if you want to fix that issue for all custom class bindings to support multi class attachments? Just let me know.
Generally speaking, this would be great because then we can keep the existing classes and just attach new ones for new rules which is better for overrides because otherwise it's necessary to double the CSS for modifications or even put it on the main container like in my case.
thexmanxyz
changed the title
activeClass vs. pagerClass
Attachment of multiple CSS Classes
Nov 9, 2017
Hey there,
I noticed a bug with the parameters
activeClass
andpagerClass
. As soon as I define a custom class forpagerClass
theactiveClass
wouldn't be rendered to the DOM. I'm not sure if this intended, however let's assume the following example:The above example would not render
'sy-active abc'
for the class, it would simply render noclass
attribute and no class.Moreover, I noticed not the overwrite alone causes the issue. If just
'sy-pager'
is defined for thepagerClass
it works as expected. Only if you change to a non default value theactiveClass
wouldn't be rendered out.Edit: I noticed it's not related to the default value. It's the blank in
pagerClass
which causes the issue. Just custom strings work but a blank within thepagerClass
strips out theactiveClass
.The text was updated successfully, but these errors were encountered: