import BaseFoundation, { DefaultAdapter } from '../base/foundation'; import { BaseRowKeyType } from './foundation'; export interface TableRowAdapter

, S = Record> extends DefaultAdapter { notifyClick: (rowKey: BaseRowKeyType, e: any, expand: boolean) => void; notifyDoubleClick: (record: Record, e: any) => void; notifyMouseEnter: (record: Record, e: any) => void; notifyMouseLeave: (record: Record, e: any) => void; } // eslint-disable-next-line max-len export default class TableRowFoundation

, S = Record> extends BaseFoundation, P, S> { handleClick(e: any) { const { expanded, rowKey } = this.getProps(); this._adapter.notifyClick(rowKey, e, expanded); } handleDoubleClick(e: any) { this._adapter.notifyDoubleClick(this.getProp('record'), e); } handleMouseEnter(e: any) { const record = this.getProp('record'); this._adapter.notifyMouseEnter(record, e); } handleMouseLeave(e: any) { const record = this.getProp('record'); this._adapter.notifyMouseLeave(record, e); } }