2
0
Эх сурвалжийг харах

fixes, esp for RefMap and SimpleScrollGrid

Adam Shaw 6 жил өмнө
parent
commit
c489f995f9

+ 1 - 1
packages-premium

@@ -1 +1 @@
-Subproject commit 169ce0b61b23017cddfe83373d531185d629032b
+Subproject commit cef661325fdaef8b6d957bdb9de05e45c72e4051

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

@@ -31,10 +31,11 @@ export interface ChunkConfig {
   outerContent?: VNode
   content?: ChunkConfigContent
   rowContent?: ChunkConfigRowContent
+  rowSelector?: string
   vGrowRows?: boolean
   scrollerElRef?: Ref<HTMLDivElement>
   elRef?: Ref<HTMLTableCellElement>
-  className?: string // on the <td>
+  className?: string // on the wrapping chunk <td>. impossible in print view
 }
 
 export interface ChunkContentCallbackArgs { // TODO: util for wrapping tables!?

+ 2 - 2
packages/core/src/util/RefMap.ts

@@ -7,7 +7,7 @@ TODO: make OtherArgs a single object to avoid spreading?
 export default class RefMap<RefType, OtherArgs extends any[] = []> {
 
   public currentMap: { [key: string]: RefType } = {}
-  public otherArgsMap: { [key: string]: OtherArgs } = {}
+  private otherArgsMap: { [key: string]: OtherArgs } = {}
   private callbackMap: { [key: string]: (val: RefType | null) => void } = {}
 
 
@@ -45,7 +45,7 @@ export default class RefMap<RefType, OtherArgs extends any[] = []> {
   }
 
 
-  collect(
+  collect( // TODO: check callers that don't care about order. should use getAll instead
     startIndex = 0,
     endIndex?: number,
     step = 1,