1
0
Tienson Qin 3 жил өмнө
parent
commit
6987e40c2e

+ 2 - 2
src/main/frontend/components/block.cljs

@@ -375,7 +375,7 @@
 
 (rum/defc page-inner
   "The inner div of page reference component
-   
+
    page-name-in-block is the overridable name of the page (legacy)
 
    All page-names are sanitized except page-name-in-block"
@@ -2937,7 +2937,7 @@
       "main-content-container"
       (block-list config segment)
       {:on-load bottom-reached
-       :threhold 1000
+       :threshold 1000
        :has-more has-more?
        :more (if (:preview? config) "More" (ui/loading "Loading"))})]))
 

+ 4 - 4
src/main/frontend/ui.cljs

@@ -376,12 +376,12 @@
     down?))
 
 (defn on-scroll
-  [node {:keys [on-load on-top-reached threhold]
-         :or {threhold 500}}]
+  [node {:keys [on-load on-top-reached threshold]
+         :or {threshold 500}}]
   (let [full-height (gobj/get node "scrollHeight")
         scroll-top (gobj/get node "scrollTop")
         client-height (gobj/get node "clientHeight")
-        bottom-reached? (<= (- full-height scroll-top client-height) threhold)
+        bottom-reached? (<= (- full-height scroll-top client-height) threshold)
         top-reached? (= scroll-top 0)
         down? (scroll-down?)]
     (when (and down? bottom-reached? on-load)
@@ -401,7 +401,7 @@
 (rum/defcs infinite-list <
   (mixins/event-mixin attach-listeners)
   "Render an infinite list."
-  [state list-element-id body {:keys [on-load on-top-reached threhold
+  [state list-element-id body {:keys [on-load on-top-reached threshold
                                       has-more more more-class]
                                :or {more-class "text-sm"}}]
   (rum/with-context [[t] i18n/*tongue-context*]