Browse Source

scrollgrid sections renamed to header/footer

Adam Shaw 5 years ago
parent
commit
478800bc99

+ 1 - 1
packages-premium

@@ -1 +1 @@
-Subproject commit 4b59973671033d7187ff94555f0b98aba0304371
+Subproject commit fc8cdf655a9316756c0b469ca72d306678103ed4

+ 1 - 1
packages/core/src/scrollgrid/util.tsx

@@ -17,7 +17,7 @@ export interface ColProps {
 
 export interface SectionConfig {
   outerContent?: VNode
-  type?: 'body' | 'head' | 'foot'
+  type?: 'body' | 'header' | 'footer'
   className?: string
   maxHeight?: number
   liquid?: boolean

+ 5 - 5
packages/core/src/styles/_scrollgrid.scss

@@ -32,12 +32,12 @@
 
 // dedup top/bottom borders
 // rows own their top border for the most part
-.fc-scrollgrid tr:not(.fc-scrollgrid-section-head) > * { // but header still owns its bottom border
+.fc-scrollgrid tr:not(.fc-scrollgrid-section-header) > * { // but header still owns its bottom border
   border-bottom: 0;
 }
 .fc-scrollgrid tr:first-child > *,
-.fc-scrollgrid-section-head + .fc-scrollgrid-section > *, // the section right after the header
-.fc .fc-scrollgrid-section-foot > * { // the foot, because it's usually just scrollbars
+.fc-scrollgrid-section-header + .fc-scrollgrid-section > *, // the section right after the header
+.fc .fc-scrollgrid-section-footer > * { // the foot, because it's usually just scrollbars
   border-top: 0;
 }
 
@@ -79,11 +79,11 @@
 
 // stickiness
 
-.fc-scrollgrid-section-head > td { // TODO: rename "header" ?
+.fc-scrollgrid-section-header > td {
   top: 0; // for when sticky
 }
 
-.fc-scrollgrid-section-foot > td { // TODO: rename "footer" ?
+.fc-scrollgrid-section-footer > td {
   bottom: 0; // for when sticky
 }
 

+ 3 - 3
packages/daygrid/src/TableView.tsx

@@ -36,7 +36,7 @@ export default abstract class TableView<State={}> extends DateComponent<ViewProp
 
     if (headerRowContent) {
       sections.push({
-        type: 'head',
+        type: 'header',
         isSticky: stickyHeaderDates,
         chunk: {
           elRef: this.headerElRef,
@@ -88,7 +88,7 @@ export default abstract class TableView<State={}> extends DateComponent<ViewProp
 
     if (headerRowContent) {
       sections.push({
-        type: 'head',
+        type: 'header',
         isSticky: stickyHeaderDates,
         chunks: [{
           elRef: this.headerElRef,
@@ -108,7 +108,7 @@ export default abstract class TableView<State={}> extends DateComponent<ViewProp
 
     if (stickyFooterScrollbar) {
       sections.push({
-        type: 'foot',
+        type: 'footer',
         isSticky: true,
         chunks: [{ content: renderScrollShim }]
       })

+ 3 - 3
packages/timegrid/src/TimeColsView.tsx

@@ -55,7 +55,7 @@ export default abstract class TimeColsView extends DateComponent<ViewProps> {
 
     if (headerRowContent) {
       sections.push({
-        type: 'head',
+        type: 'header',
         isSticky: stickyHeaderDates,
         chunk: {
           elRef: this.headerElRef,
@@ -131,7 +131,7 @@ export default abstract class TimeColsView extends DateComponent<ViewProps> {
 
     if (headerRowContent) {
       sections.push({
-        type: 'head',
+        type: 'header',
         isSticky: stickyHeaderDates,
         chunks: [
           {
@@ -193,7 +193,7 @@ export default abstract class TimeColsView extends DateComponent<ViewProps> {
     if (stickyFooterScrollbar) {
       sections.push({
         key: 'scroll',
-        type: 'foot',
+        type: 'footer',
         isSticky: true,
         chunks: [
           { content: renderScrollShim },