AdminLTE
AdminLTE copied to clipboard
Fix control sidebar when not using the slide animation
This PR includes a fix to the control sidebar when using the data-controlsidebar-slide="false"
option. Related to issue #3716
You can see it working on next video:
https://user-images.githubusercontent.com/63609705/119242705-98232400-bb36-11eb-92e4-d7df1fda8eea.mp4
Also index3.html
demo page was modified to include that option, so it is easy to test on the future.
Alternative Solution.
Instead of changing the ControlSidebar.js
, we can change style of .control-sidebar-open
class in _control-sidebar.scss
to add display: block !important
instead of just display: block
, as shown next:
// Control sidebar open state
.control-sidebar-open {
.control-sidebar {
display: block !important; /* HERE */
&,
&::before {
right: 0;
}
}
&.control-sidebar-push,
&.control-sidebar-push-slide {
.content-wrapper,
.main-footer {
margin-right: $control-sidebar-width;
}
}
}
So, let me know what solution is better...
@danny007in I'm going to replace the old data-slide="true"
option by data-controlsidebar-slide="true"
on all the demo pages. Is that ok?
@danny007in I'm going to replace the old
data-slide="true"
option bydata-controlsidebar-slide="true"
on all the demo pages. Is that ok?
No it will become braking change
But data-slide="true"
won't have any effect now. The ControlSidebar.js
plugin only read the option data-controlsidebar-slide
. What's the sense to keep old usage on all the examples?
@danny007in I'm going to replace the old
data-slide="true"
option bydata-controlsidebar-slide="true"
on all the demo pages. Is that ok?
I have these changes ready. @REJack please tell me if these replacements are needed...