Scheduler: refactor Tooltip Strategies module (TS)#33482
Scheduler: refactor Tooltip Strategies module (TS)#33482sjbur wants to merge 3 commits intoDevExpress:26_1from
Conversation
| const { editing } = this.extraOptions ?? {}; | ||
| const disabled = this._options.getAppointmentDisabled(appointment); | ||
| const isDeletingAllowed = editing === true || editing?.allowDeleting === true; | ||
| const isDeletingAllowed = editing === true |
There was a problem hiding this comment.
minor:
const isDeletingAllowed =Boolean(editing ?? editing?.allowDeleting);
There was a problem hiding this comment.
I am not sure that we can do this. editing could be either a boolean or an object. So we need to check if its an object before checking allowDeleting value
| this.list.registerKeyHandler?.('escape', (): void => { | ||
| this.hide(); | ||
| this.tooltip.option('target').focus(); | ||
| const target = this.tooltip?.option('target') as { focus?: () => void } | undefined; |
There was a problem hiding this comment.
I suggest to cast target to dxElementWrapper
| private createItemListContent(appointment, targetedAppointment, color) { | ||
| private createItemListContent( | ||
| appointment: Appointment, | ||
| targetedAppointment: Appointment | TargetedAppointment | undefined, |
There was a problem hiding this comment.
Is it possible to use this type?:
targetedAppointmewnt?: TargetedAppointment
There was a problem hiding this comment.
I am not sure. In scheduler api we use showAppointmentTooltip, which passes targetedAppointment?: SafeAppointment
So the targetedAppointment could be undefined and SafeAppointment (Appointment) type is not exactly the same as TargetedAppointment
There was a problem hiding this comment.
Is it possible to use this type?:
dataList: AppointmentTooltipItem[]
No description provided.