module Row_id = Row_id
module Sort_key = Row_id
module Height_cache : sig ... end
Height_cache keeps track of the rendered height of items so that scrolling to a given position can decide which elements to render accurately. This allows rows to have different heights and change height at runtime.
val measurements : _ t -> Incr_dom_partial_render__Partial_render_list_intf.Measurements.t option
find_by_relative_position t key ~offset returns the key at a distance of approximately
offset away from
key, preferring closer elements to farther ones. If the offset extends past the end of the list, the end key is returned instead.
Meant for rendering, apps should normally use Incr.Map.mapi' on this
(top, bottom) spacer pixel heights to put the rendered rows in the right place
val scroll_into_scroll_region : ?in_:Util.Scroll_region.t -> _ t -> top_margin:float -> bottom_margin:float -> key:Sort_key.t -> Util.Scroll_result.t
Scroll the view to the row with the given key, scrolling the minimum amount possible while still being
(top|bottom)_margin pixels away from the top and bottom of the screen. If this can't be satisfied, the margin will be reduced to the point where it can. If a margin of 0 can't show the whole element, it will prefer showing the top.
?in determines the element which should be scrolled. Default is `Window
None if the given key does not exist or the view rect and list rect measurements are not yet available.
measure_heights_simple updates a height cache by measuring the rendered elements, relying on the app to provide a function for finding and measuring the element for a given key. This function can be used for table with collapsed borders and box sizing set to border-box.
val measure_heights : _ t -> measure_row:( Sort_key.t -> 'm option ) -> get_row_height: ( prev:'m option -> curr:'m option -> next:'m option -> float option ) -> Height_cache.t
measure_heights is like
measure_heights_simple, but allows the app to use the previous and next rows in addition to the current row to measure the current row's height (e.g. using the bottom position of the previous row and/or the top position of the next row). To avoid retaking the same measures three times for each row (once as the "previous" row, once as the "current" row, and once as the "next" row),
measure_row allows the app to specify what measurements to take for a given row, and it is called exactly once per row. This function should be used for tables with non-collapsed borders.