Преглед изворни кода

fixes, esp for RefMap and SimpleScrollGrid

Adam Shaw пре 6 година
родитељ
комит
c489f995f9
3 измењених фајлова са 5 додато и 4 уклоњено
  1. 1 1
      packages-premium
  2. 2 1
      packages/core/src/scrollgrid/util.tsx
  3. 2 2
      packages/core/src/util/RefMap.ts

+ 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
   outerContent?: VNode
   content?: ChunkConfigContent
   content?: ChunkConfigContent
   rowContent?: ChunkConfigRowContent
   rowContent?: ChunkConfigRowContent
+  rowSelector?: string
   vGrowRows?: boolean
   vGrowRows?: boolean
   scrollerElRef?: Ref<HTMLDivElement>
   scrollerElRef?: Ref<HTMLDivElement>
   elRef?: Ref<HTMLTableCellElement>
   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!?
 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[] = []> {
 export default class RefMap<RefType, OtherArgs extends any[] = []> {
 
 
   public currentMap: { [key: string]: RefType } = {}
   public currentMap: { [key: string]: RefType } = {}
-  public otherArgsMap: { [key: string]: OtherArgs } = {}
+  private otherArgsMap: { [key: string]: OtherArgs } = {}
   private callbackMap: { [key: string]: (val: RefType | null) => void } = {}
   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,
     startIndex = 0,
     endIndex?: number,
     endIndex?: number,
     step = 1,
     step = 1,