Skip to content

Commit ff5bdfc

Browse files
committed
add inner level button
1 parent 83b9914 commit ff5bdfc

File tree

4 files changed

+51
-20
lines changed

4 files changed

+51
-20
lines changed

src/App.js

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@ import InputBox from 'components/InputBox';
55

66
class App extends Component {
77
render() {
8+
const data = {
9+
id: 0,
10+
name: 'Tone',
11+
children: {
12+
negative: {
13+
id: 'negative',
14+
name: 'Negative',
15+
children: {
16+
negative1: {
17+
id: 'negative1',
18+
name: 'Negative1',
19+
children: null,
20+
parentId: 'negative'
21+
},
22+
negative2: {
23+
id: 'negative2',
24+
name: 'Negative2',
25+
children: null,
26+
parentId: 'negative'
27+
}
28+
},
29+
parentId: 0
30+
},
31+
positive: {
32+
id: 'positive',
33+
name: 'Positive',
34+
children: null,
35+
parentId: 0
36+
},
37+
neutral: {id: 'neutral', name: 'Neutral', children: null, parentId: 0}
38+
}
39+
};
40+
data.children.negative.children.negative1.parent = data.children.negative;
41+
data.children.negative.children.negative2.parent = data.children.negative;
42+
console.log(data);
843
return (
944
<div className="App">
1045
<header className="App-header">
@@ -17,19 +52,11 @@ class App extends Component {
1752
<div className="App-body">
1853
<InputBox
1954
name="Tone"
20-
filter={{
21-
id: 0,
22-
name: 'Tone',
23-
children: {
24-
negative: {id: 'negative', name: 'Negative', children: null, parentId: 0},
25-
positive: {id: 'positive', name: 'Positive', children: null, parentId: 0},
26-
neutral: {id: 'neutral', name: 'Neutral', children: null, parentId: 0}
27-
}
28-
}}
55+
filter={data}
2956
multipleSelect={false}
3057
clearall
3158
search
32-
direction="horizontal"
59+
direction="vertical"
3360
checkFilter={(name, filter, checked) => {
3461
console.log(this.state, name, filter, checked);
3562
}}

src/node_modules/components/CheckBox/CheckBox.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node_modules/components/InputBox/InputBox.js

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node_modules/components/Radio/Radio.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)