Skip to content

Commit

Permalink
fix(events): use nullish coalescing in slickgrid event prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Jul 13, 2021
1 parent d37af07 commit 6ff551b
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -5,7 +5,6 @@ import 'slickgrid/slick.core';
import 'slickgrid/slick.grid';
import 'slickgrid/slick.dataview';
import 'slickgrid/slick.groupitemmetadataprovider';
import 'slickgrid/plugins/slick.resizer';
import {
autoAddEditorFormatterToColumnsWithEditor,
AutoCompleteEditor,
Expand Down Expand Up @@ -818,7 +817,7 @@ export class SlickVanillaGridBundle {
if (grid.hasOwnProperty(prop) && prop.startsWith('on')) {
const gridEventHandler = (grid as any)[prop];
(this._eventHandler as SlickEventHandler<GetSlickEventType<typeof gridEventHandler>>).subscribe(gridEventHandler, (event, args) => {
const gridEventName = this._eventPubSubService.getEventNameByNamingConvention(prop, this._gridOptions?.defaultSlickgridEventPrefix || '');
const gridEventName = this._eventPubSubService.getEventNameByNamingConvention(prop, this._gridOptions?.defaultSlickgridEventPrefix ?? '');
return this._eventPubSubService.dispatchCustomEvent(gridEventName, { eventData: event, args });
});
}
Expand All @@ -829,7 +828,7 @@ export class SlickVanillaGridBundle {
if (dataView.hasOwnProperty(prop) && prop.startsWith('on')) {
const dataViewEventHandler = (dataView as any)[prop];
(this._eventHandler as SlickEventHandler<GetSlickEventType<typeof dataViewEventHandler>>).subscribe(dataViewEventHandler, (event, args) => {
const dataViewEventName = this._eventPubSubService.getEventNameByNamingConvention(prop, this._gridOptions?.defaultSlickgridEventPrefix || '');
const dataViewEventName = this._eventPubSubService.getEventNameByNamingConvention(prop, this._gridOptions?.defaultSlickgridEventPrefix ?? '');
return this._eventPubSubService.dispatchCustomEvent(dataViewEventName, { eventData: event, args });
});
}
Expand Down

0 comments on commit 6ff551b

Please sign in to comment.