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>
101101 < Body >
102102 < TreeSelect
103103 defaultValue = { [ '01' , '01-1' ] }
104- // activeColor="#fd8a00"
104+ activeColor = "#fd8a00"
105105 options = { option }
106106 onChange = { ( value : any , nodes : any ) => {
107107 console . log ( value , nodes ) ;
Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ import { StyleSheet } from 'react-native';
33export const style = StyleSheet . create ( {
44 item : {
55 minHeight : 50 ,
6- paddingVertical : 6 ,
7- paddingHorizontal : 12 ,
8- position : 'relative' ,
96 display : 'flex' ,
107 alignItems : 'center' ,
118 justifyContent : 'center' ,
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ export const TreeSelect: FC<TreeSelectProps> = (p) => {
5050 } ) ;
5151 }
5252 traverse ( undefined , props . options ) ;
53-
5453 return [ deep , optionsMap , optionsParentMap ] ;
5554 } , [ props . options ] ) ;
5655
@@ -82,7 +81,7 @@ export const TreeSelect: FC<TreeSelectProps> = (p) => {
8281 onItemSelect ( item ) ;
8382 }
8483 } }
85- style = { style . item }
84+ style = { [ style . item , isActive ? { backgroundColor : '#fff' } : { } ] }
8685 >
8786 < Text style = { isActive ? { color : props . activeColor , fontWeight : 'bold' } : { } } > { item [ labelName ] } </ Text >
8887 </ TouchableOpacity >
@@ -103,7 +102,7 @@ export const TreeSelect: FC<TreeSelectProps> = (p) => {
103102 width = `66.67%` ;
104103 }
105104 const column = (
106- < ScrollView key = { i } style = { { width, flex : 1 } } >
105+ < ScrollView key = { i } style = { { width, flex : 1 , backgroundColor : '#fff' } } >
107106 { renderItems ( i === 0 ? props . options : optionsMap . get ( value [ i - 1 ] ) ?. [ childrenName ] , i ) }
108107 </ ScrollView >
109108 ) ;
You can’t perform that action at this time.
0 commit comments