Skip to content

Commit

Permalink
fix: add template functions can return HTMLElement (#836)
Browse files Browse the repository at this point in the history
In my own use case, I'm trying to attach a Vue component containing an image. Some properties are computed against `scrollHeight` of this image, and this is 0 if the element is not attached to the DOM.

So returning `outerHTML` is not the same thing as returning the element itself.
  • Loading branch information
Glandos authored Dec 18, 2020
1 parent 2c16f5a commit 63fb02d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export type TimelineOptionsMarginType = number | TimelineMarginOption;
export type TimelineOptionsOrientationType = string | TimelineOrientationOption;
export type TimelineOptionsSnapFunction = (date: Date, scale: string, step: number) => Date | number;
export type TimelineOptionsSnapType = null | TimelineOptionsSnapFunction;
export type TimelineOptionsTemplateFunction = (item?: any, element?: any, data?: any) => string;
export type TimelineOptionsTemplateFunction = (item?: any, element?: any, data?: any) => string | HTMLElement;
export type TimelineOptionsComparisonFunction = (a: any, b: any) => number;
export type TimelineOptionsGroupHeightModeType = 'auto' | 'fixed' | 'fitItems';
export type TimelineOptionsClusterCriteriaFunction = (firstItem: TimelineItem, secondItem: TimelineItem) => boolean;
Expand Down

0 comments on commit 63fb02d

Please sign in to comment.