Closed Cata1989 closed 1 month ago
do not always function correctly
in what way?
avoid ESLint complaints
what is it complaining about?
consider changing the event handling mechanism
it uses standard events, there's nothing that can be changed
Hi, the issue is the name of the events onRangeStart
/ onRangeEnd
are not recognised if attached to <calendar-range>
. Can you rename them in the types to onRangestart
/ onRangeend
.
Currently we are using exported interfaces to enhance our jsx
Oh it's a typescript issue? You can probably get away with mapping the types yourself:
type MapEventName<T> = T extends `on${infer Rest}`
? `on${Capitalize<Lowercase<Rest>>}`
: T;
type MapEvents<T> = {
[K in keyof T as MapEventName<K>]: T[K];
};
type MappedRangeProps = MapEvents<CalendarRangeProps>
Closing for now, as I think the above will solve your issues
The onRangestart and onRangeend events in the Cally library do not always function correctly. To avoid ESLint complaints in StencilJS, the following rules need to be added:
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error onRangestart={this.handleCalendarRangestart} onRangeend={this.handleCalendarRangeend}
Please fix these event issues or consider changing the event handling mechanism to improve reliability and performance.