Hi, there is an error with the lightbox.addFilter('thumbEl'... function
(i used the example code from this page - https://photoswipe.com/data-sources/#separate-dom-and-data)
Here is the error message:
Argument of type '(thumbEl: HTMLElement | null | undefined, data: SlideData, index: number) => HTMLElement | null | undefined' is not assignable to parameter of type '(thumbnail: HTMLElement | null | undefined, itemData: SlideData, index: number) => HTMLElement'.
Type 'HTMLElement | null | undefined' is not assignable to type 'HTMLElement'.
Type 'undefined' is not assignable to type 'HTMLElement'.ts
the addFilter() function doesnt allow null or undefined value to be returned. It always require the HtmlElement as return type.
Is there any way to solve it?
Thank you
Hi, there is an error with the lightbox.addFilter('thumbEl'... function
(i used the example code from this page - https://photoswipe.com/data-sources/#separate-dom-and-data)
Here is the error message:
Argument of type '(thumbEl: HTMLElement | null | undefined, data: SlideData, index: number) => HTMLElement | null | undefined' is not assignable to parameter of type '(thumbnail: HTMLElement | null | undefined, itemData: SlideData, index: number) => HTMLElement'.
Type 'HTMLElement | null | undefined' is not assignable to type 'HTMLElement'.
Type 'undefined' is not assignable to type 'HTMLElement'.ts
the addFilter() function doesnt allow null or undefined value to be returned. It always require the HtmlElement as return type.
Is there any way to solve it?
Thank you