Skip to content

Commit 9fc6f1d

Browse files
committed
prepublish script & sticky caching bugfix
1 parent 57d7ff9 commit 9fc6f1d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
"test": "npm run lint && npm run testonly",
7878
"test-watch": "npm run testonly -- --watch --watch-extensions js",
7979
"testonly": "BABEL_ENV=test && mocha $npm_package_options_mocha",
80-
"build-all": "npm run build && npm run build-storybook && git add -A && git commit -am \"built\""
80+
"build-all": "npm run build && npm run build-storybook && git add -A && git commit -am \"built\"",
81+
"prepublishOnly": "npm run build && npm version patch && git push"
8182
},
8283
"source": "src/index.js"
8384
}

src/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ class StickyTable extends React.Component {
142142
p.stickyHeaderCount, p.stickyFooterCount, p.leftStickyColumnCount, p.rightStickyColumnCount
143143
].some(count => count > 1);
144144

145+
//HINT clear out stickyInsets of a new interval won't be set
146+
if (!shouldSchedule && this.multipleStickiesInterval) {
147+
this.setState({stickyInsets: {header: [], footer: [], leftColumn: [], rightColumn: []}});
148+
}
149+
145150
this.clearMultipleStickiesInterval();
146151

147152
if (shouldSchedule) {

0 commit comments

Comments
 (0)