openworm / geppetto-client

The web client of a Geppetto application
Other
4 stars 2 forks source link

Fix Query Component's Image Carousel Feature #338

Open jrmartin opened 4 years ago

jrmartin commented 4 years ago

There's a bug when creating a carousel inside the Query component.

This solution fixes it https://github.com/kenwheeler/slick/issues/1953#issuecomment-220598733

stacktrace:

  | Slick.initADA | @ | slick.js:1306
-- | -- | -- | --
  | Slick.init | @ | slick.js:1287
  | Slick | @ | slick.js:182
  | $.fn.slick | @ | slick.js:3002
  | componentDidMount | @ | slideshowImageComponent.js:165
  | commitLifeCycles | @ | react-dom.development.js:19814
  | commitLayoutEffects | @ | react-dom.development.js:22803
  | callCallback | @ | react-dom.development.js:188
  | invokeGuardedCallbackDev | @ | react-dom.development.js:237
  | invokeGuardedCallback | @ | react-dom.development.js:292
  | commitRootImpl | @ | react-dom.development.js:22541
  | unstable_runWithPriority | @ | scheduler.development.js:653
  | runWithPriority$1 | @ | react-dom.development.js:11039
  | commitRoot | @ | react-dom.development.js:22381
  | finishSyncRender | @ | react-dom.development.js:21807
  | performSyncWorkOnRoot | @ | react-dom.development.js:21793
  | (anonymous) | @ | react-dom.development.js:11089
  | unstable_runWithPriority | @ | scheduler.development.js:653
  | runWithPriority$1 | @ | react-dom.development.js:11039
  | flushSyncCallbackQueueImpl | @ | react-dom.development.js:11084
  | flushSyncCallbackQueue | @ | react-dom.development.js:11072
  | scheduleUpdateOnFiber | @ | react-dom.development.js:21199
  | enqueueSetState | @ | react-dom.development.js:12639
  | Component.setState | @ | react.development.js:471
  | switchView | @ | queryBuilder.js:328
  | queryDoneCallback | @ | queryBuilder.js:939
  | (anonymous) | @ | QueriesController.js:37
  | parseAndNotify | @ | MessageSocket.js:310
  | processBinaryMessage | @ | MessageSocket.js:327
  | GEPPETTO.MessageSocket.socket.onmessage | @ | MessageSocket.js:106
  overrideMethod @ react_devtools_backend.js:2273
  console.error @ VFBMainContainer.js_+_105_modules:73942
  logCapturedError @ react-dom.development.js:19527
  logError @ react-dom.development.js:19564
  callback @ react-dom.development.js:20744
  callCallback @ react-dom.development.js:12490
  commitUpdateQueue @ react-dom.development.js:12511
  commitLifeCycles @ react-dom.development.js:19858
  commitLayoutEffects @ react-dom.development.js:22803
  callCallback @ react-dom.development.js:188
  invokeGuardedCallbackDev @ react-dom.development.js:237
  invokeGuardedCallback @ react-dom.development.js:292
  commitRootImpl @ react-dom.development.js:22541
  unstable_runWithPriority @ scheduler.development.js:653
  runWithPriority$1 @ react-dom.development.js:11039
  commitRoot @ react-dom.development.js:22381
  finishSyncRender @ react-dom.development.js:21807
  performSyncWorkOnRoot @ react-dom.development.js:21793
  (anonymous) @ react-dom.development.js:11089
  unstable_runWithPriority @ scheduler.development.js:653
  runWithPriority$1 @ react-dom.development.js:11039
  flushSyncCallbackQueueImpl @ react-dom.development.js:11084
  flushSyncCallbackQueue @ react-dom.development.js:11072
  scheduleUpdateOnFiber @ react-dom.development.js:21199
  enqueueSetState @ react-dom.development.js:12639
  Component.setState @ react.development.js:471
  switchView @ queryBuilder.js:328
  queryDoneCallback @ queryBuilder.js:939
  (anonymous) @ QueriesController.js:37
  parseAndNotify @ MessageSocket.js:310
  Show 2 more frames