import React from 'react';
import DeviceTree from '../index';

const Demo = () => {
  const onTreeCheck = (checkedKeysValue) => {
    console.log('onTreeCheck', checkedKeysValue);
  };

  const onTreeSelect = (selectedKeysValue) => {
    console.log('onTreeSelect', selectedKeysValue);
  };

  return (
    <div style={{ width: '200px', height: '400px', border: '1px solid #eee' }}>
      <DeviceTree
        onCheck={(data) => {
          console.log(data);
        }}
        onSelect={(data) => {
          console.log(data);
        }}
        checkable={true}
        selectable={true}
        deviceTypes={'压力表,熊猫水表,二供泵房'}
        sortFields={''}
        direction={''}
        classField={'所属分区'}
        getChild={true}
        userAccessor={false}
        keepChecked
        setDeviceList={() => {}}
        setSearchStr={() => {}}
      />
    </div>
  );
};

export default Demo;
