diff --git a/src/tree-node/index.css b/src/tree-node/index.css index a14f7774..cd7bc62a 100644 --- a/src/tree-node/index.css +++ b/src/tree-node/index.css @@ -4,10 +4,6 @@ padding: 4px; } -.searchModeOn li.node { - padding-left: 0 !important; -} - .toggle { white-space: pre; margin-right: 4px; diff --git a/src/tree-node/index.js b/src/tree-node/index.js index c4bb6ebc..88346f12 100644 --- a/src/tree-node/index.js +++ b/src/tree-node/index.js @@ -8,14 +8,14 @@ import styles from './index.css' const cx = cn.bind(styles) const TreeNode = props => { - const { node, onNodeToggle, onCheckboxChange, onAction } = props + const { node, onNodeToggle, onCheckboxChange, onAction, searchModeOn } = props const actions = node.actions || [] const isLeaf = isEmpty(node._children) const liCx = cx('node', { leaf: isLeaf, tree: !isLeaf, hide: node.hide }, node.className) const toggleCx = cx('toggle', { expanded: !isLeaf && node.expanded, collapsed: !isLeaf && !node.expanded }) return ( -
  • +
  • onNodeToggle(node._id)} />