remove button fir first tag

This commit is contained in:
u-e 2019-02-12 16:46:58 +03:00
parent 2a44133bc4
commit 33b993cc45

View File

@ -99,32 +99,32 @@ export default class TagAreaView extends Component {
<ScrollView horizontal style={styles.tagWrapper}>
{chips.map(
(chip, i) => i < 5 && (
<Chip
key={i}
refs={(input) => {
this.inputs[i] = input;
}}
isPin={i === 0 && chips[1]}
placeholderTextColor="#fff"
removeButton={i !== 0}
handleOnRemoveButtonPress={() => this._handleTagRemove(i)}
editable={!isPreviewActive}
maxLength={50}
placeholder="tags"
autoFocus={i !== 0 && chips.length - 1 === i}
multiline={false}
handleOnChange={text => this._handleOnChange(text, i)}
handleOnBlur={() => this._handleOnBlur(i)}
blurOnSubmit
value={
activeChip === i
? currentText || chip.replace(/\s/g, '')
: chip.replace(/\s/g, '')
}
autoCapitalize="none"
onFocus={() => this.setState({ activeChip: i })}
{...this.props}
/>
<Chip
key={i}
refs={(input) => {
this.inputs[i] = input;
}}
isPin={i === 0 && chips[1]}
placeholderTextColor="#fff"
removeButton
handleOnRemoveButtonPress={() => this._handleTagRemove(i)}
editable={!isPreviewActive}
maxLength={50}
placeholder="tags"
autoFocus={i !== 0 && chips.length - 1 === i}
multiline={false}
handleOnChange={text => this._handleOnChange(text, i)}
handleOnBlur={() => this._handleOnBlur(i)}
blurOnSubmit
value={
activeChip === i
? currentText || chip.replace(/\s/g, '')
: chip.replace(/\s/g, '')
}
autoCapitalize="none"
onFocus={() => this.setState({ activeChip: i })}
{...this.props}
/>
),
)}
</ScrollView>