Skip to content

Commit

Permalink
forPrint misc
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed May 25, 2020
1 parent b72f28d commit 1a5bb84
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages-premium
2 changes: 1 addition & 1 deletion packages/common/src/styles/scrollgrid.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
border: 1px solid #ddd; // okay because bootstrap does this too
}
.fc-media-print .fc-scrollgrid { // allows it to stretch so that hard-set widths of inner table push it out!?
table-layout: auto;
/* table-layout: auto; */
}


Expand Down
9 changes: 8 additions & 1 deletion packages/common/src/util/memoize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ export function memoizeArraylike<Args extends any[], Res>( // used at all?
let i = 0

for (; i < currentLen; i++) {
if (!isArraysEqual(currentArgSets[i], newArgSets[i])) {

if (!newArgSets[i]) { // one of the old sets no longer exists
if (teardownFunc) {
teardownFunc(currentResults[i])
}

}
else if (!isArraysEqual(currentArgSets[i], newArgSets[i])) {

if (teardownFunc) {
teardownFunc(currentResults[i])
Expand Down
4 changes: 2 additions & 2 deletions packages/daygrid/src/TableView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export abstract class TableView<State={}> extends DateComponent<ViewProps, State
}

let { props, context } = this
let stickyHeaderDates = getStickyHeaderDates(context.options)
let stickyFooterScrollbar = getStickyFooterScrollbar(context.options)
let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options)
let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options)
let sections: ScrollGridSectionConfig[] = []

if (headerRowContent) {
Expand Down
4 changes: 2 additions & 2 deletions packages/timegrid/src/TimeColsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ export abstract class TimeColsView extends DateComponent<ViewProps> {
}

let { context, props } = this
let stickyHeaderDates = getStickyHeaderDates(context.options)
let stickyFooterScrollbar = getStickyFooterScrollbar(context.options)
let stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options)
let stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options)
let sections: ScrollGridSectionConfig[] = []

if (headerRowContent) {
Expand Down

0 comments on commit 1a5bb84

Please sign in to comment.