react-native-autocomplete-input icon indicating copy to clipboard operation
react-native-autocomplete-input copied to clipboard

borders style

Open CharlotteRdn opened this issue 6 years ago • 6 comments

Hi,

I'm trying to delete the top, right and left borders of my textInput (so obviously, I'd like to have just the bottom border :) ) I tried borderTop : 0 / and 'transparent' but it's not working borderStyle didn't work either

I get this: https://zupimages.net/viewer.php?id=20/03/6c88.bmp

my code is this:

<Autocomplete
            style={styles.inputContainer}
            autoCapitalize="none"
            autoCorrect={false}
            data={this.findAirports(query_arrival)}
            defaultValue={this.findAirports(query_start)}
            onChangeText={text => this.setState({ query_start: text })}
            placeholder="Enter Start airports"
            renderItem={({ airport }) => (
              <TouchableOpacity
                onPress={() => this.setState({ query_start: airport })}
              >
                <Text style={styles.h2}>{airport}-</Text>
              </TouchableOpacity>
            )}
          />
        </View>
        <View style={styles.container}>
          <Autocomplete
          style={styles.inputContainer}
            autoCapitalize="none"
            autoCorrect={false}
            data={this.findAirports(query_arrival)}
            defaultValue={this.findAirports(query_arrival)}
            onChangeText={text => this.setState({ query_arrival: text })}
            placeholder="Enter Arrival airports"
            renderItem={({ airport }) => (
              <TouchableOpacity
                onPress={() => this.setState({ query_arrival: airport })}
              >
                <Text style={styles.h2}>{airport}-</Text>
              </TouchableOpacity>
            )}
          />

with this style: 

inputContainer: { borderStyle: 'dashed', minWidth: 300, width: "90%", height: 55, backgroundColor: "transparent", padding: 5, color: "#6C6363", fontSize: 18, fontFamily: "Roboto", borderBottomWidth: 1, borderBottomColor: "rgba(108, 99, 99, .7)" },

If I can get any help that's really nice, thanks for reading and for any help !

CharlotteRdn avatar Jan 16 '20 17:01 CharlotteRdn

I removed padding and borderStyle, but still the same problem...

CharlotteRdn avatar Jan 17 '20 07:01 CharlotteRdn

It seems that's it's impossible with that package.

I could do what I wanted to do with 'native base autocomplete' . So, it doesn't completely answer the question but it allows to do the right thing !

Maybe this will help someone !

WeeCoopTech avatar Jan 23 '20 11:01 WeeCoopTech

you need to set the borderWidth to 0

inputContainerStyle={{ borderWidth: 0, borderBottomWidth: 1 }}

KiranC10 avatar Feb 27 '20 07:02 KiranC10

Thanks for the answer !

WeeCoopTech avatar Mar 05 '20 07:03 WeeCoopTech

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 07 '21 00:04 stale[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

stale[bot] avatar Apr 14 '21 22:04 stale[bot]