---
title: 5.父子节点选中是否关联 
order: 5
---

##### 通过checkStrictly设置父子节点是否关联选中状态，仅在多选情况下有效。

```jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { YwCascader } from '@ywfe/yw-design';
class App extends Component {
 constructor(props) {
    super(props);

    this.state = {
      data: []
    };
  }

  componentDidMount() {
    fetch("https://os.alipayobjects.com/rmsportal/ODDwqcDFTLAguOvWEolX.json")
      .then(response => response.json())
      .then(data => {
        this.setState({ data });
      })
      .catch(e => console.log(e));
  }
  handleChange(value, data, extra) {
    console.log(value, data, extra);
  }
  render() {
    return (
      <YwCascader
        multiple
        checkStrictly
        dataSource={this.state.data}
        onChange={this.handleChange}
      />
    );
  }
}

ReactDOM.render(<App />, mountNode);
```
