TableHeadFixer
TableHeadFixer copied to clipboard
Added baseClass and fixedClass options, made setBackground optional
I added new settings 'baseClass', 'fixedClass' and 'setBackground'.
baseClass (String - Standard: "table-head-fixer") Adds a base-class to the elements (left and right) that are selected by 'left' or 'right'. Depending on left or right a second class with 'class--left' or 'class--right' is added for side-specific styling.
fixedClass (String - Standard: "is-fixed") This class is applied as soon as the element is fixed (right/left > 0). This gives better control for different styling (like a shadow) when the fixed column is on top of another.
setBackground (Boolean) Makes the automatic background-color function optional.
Hi @der-lukas , thanks for your pull request and recommendations.
Your suggestion is great, but what do you think if we put setBackground
validation out of function for function do only action, only set background
, and put if(setBackground)
before calling function.
And maybe is more flexible if provide a callback accepting fixed cells for plugin users do anything they want, example add one class, some class or set css inline to cells.
This is suggestion