/** * @file Santd transfer render list body file * @author mayihui@baidu.com **/ import Checkbox from '../checkbox'; import {classCreator} from '../core/util'; import Base from 'santd/base'; import { TransferItem } from './interface'; const prefixCls = classCreator('transfer')('list'); export default class RenderListBody extends Base { handleItemSelect(item: TransferItem) { if (this.data.get('disabled') || item.disabled) { return; } const selectedKeys = this.data.get('selectedKeys'); const checked = selectedKeys.indexOf(item.key) >= 0; this.fire('itemSelect', {selectedKey: item.key, checked: !checked}); } handleScroll(e: Event) { this.fire('scroll', e); } static components = { 's-checkbox': Checkbox } static template = ` ` };