検索削除機能を追加
This commit is contained in:
parent
0c10bcc339
commit
acd5d0bb88
@ -79,6 +79,9 @@ export const SearchUnitBox = ({
|
|||||||
paddingRight: 10,
|
paddingRight: 10,
|
||||||
paddingLeft: 10,
|
paddingLeft: 10,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
flexDirection: "row",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
@ -88,9 +91,26 @@ export const SearchUnitBox = ({
|
|||||||
value={input}
|
value={input}
|
||||||
style={{ flex: 1 }}
|
style={{ flex: 1 }}
|
||||||
/>
|
/>
|
||||||
|
{input && (
|
||||||
|
<TouchableOpacity
|
||||||
|
onPress={() => setInput("") }
|
||||||
|
style={{
|
||||||
|
padding: 3,
|
||||||
|
borderRadius: 15,
|
||||||
|
backgroundColor: "lightgray",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Ionicons
|
||||||
|
name="close"
|
||||||
|
size={20}
|
||||||
|
color="white"
|
||||||
|
/>
|
||||||
|
</TouchableOpacity>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{!input &&<View style={{ flexDirection: "row", alignItems: "center" }}>
|
{!input && (
|
||||||
|
<View style={{ flexDirection: "row", alignItems: "center" }}>
|
||||||
{Object.keys(lineList_LineWebID).map((d) => (
|
{Object.keys(lineList_LineWebID).map((d) => (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={{
|
style={{
|
||||||
@ -121,13 +141,18 @@ export const SearchUnitBox = ({
|
|||||||
key={stationIDPair[lineList_LineWebID[d]]}
|
key={stationIDPair[lineList_LineWebID[d]]}
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
style={{ color: "white", fontWeight: "bold", fontSize: 20 }}
|
style={{
|
||||||
|
color: "white",
|
||||||
|
fontWeight: "bold",
|
||||||
|
fontSize: 20,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{stationIDPair[lineList_LineWebID[d]]}
|
{stationIDPair[lineList_LineWebID[d]]}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
))}
|
))}
|
||||||
</View>}
|
</View>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
Loading…
Reference in New Issue
Block a user