File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
example/examples/src/routes/TreeSelect
packages/core/src/TreeSelect Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export default class TreeSelectDemo extends React.Component<TreeSelectViewProps>
101
101
< Body >
102
102
< TreeSelect
103
103
defaultValue = { [ '01' , '01-1' ] }
104
- // activeColor="#fd8a00"
104
+ activeColor = "#fd8a00"
105
105
options = { option }
106
106
onChange = { ( value : any , nodes : any ) => {
107
107
console . log ( value , nodes ) ;
Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ import { StyleSheet } from 'react-native';
3
3
export const style = StyleSheet . create ( {
4
4
item : {
5
5
minHeight : 50 ,
6
- paddingVertical : 6 ,
7
- paddingHorizontal : 12 ,
8
- position : 'relative' ,
9
6
display : 'flex' ,
10
7
alignItems : 'center' ,
11
8
justifyContent : 'center' ,
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ export const TreeSelect: FC<TreeSelectProps> = (p) => {
50
50
} ) ;
51
51
}
52
52
traverse ( undefined , props . options ) ;
53
-
54
53
return [ deep , optionsMap , optionsParentMap ] ;
55
54
} , [ props . options ] ) ;
56
55
@@ -82,7 +81,7 @@ export const TreeSelect: FC<TreeSelectProps> = (p) => {
82
81
onItemSelect ( item ) ;
83
82
}
84
83
} }
85
- style = { style . item }
84
+ style = { [ style . item , isActive ? { backgroundColor : '#fff' } : { } ] }
86
85
>
87
86
< Text style = { isActive ? { color : props . activeColor , fontWeight : 'bold' } : { } } > { item [ labelName ] } </ Text >
88
87
</ TouchableOpacity >
@@ -103,7 +102,7 @@ export const TreeSelect: FC<TreeSelectProps> = (p) => {
103
102
width = `66.67%` ;
104
103
}
105
104
const column = (
106
- < ScrollView key = { i } style = { { width, flex : 1 } } >
105
+ < ScrollView key = { i } style = { { width, flex : 1 , backgroundColor : '#fff' } } >
107
106
{ renderItems ( i === 0 ? props . options : optionsMap . get ( value [ i - 1 ] ) ?. [ childrenName ] , i ) }
108
107
</ ScrollView >
109
108
) ;
You can’t perform that action at this time.
0 commit comments