mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-01 01:03:16 +01:00
Convert Autocmplete from tabs to spaces
This commit is contained in:
parent
7bc2323401
commit
48f10bcb73
1 changed files with 30 additions and 27 deletions
|
@ -13,41 +13,44 @@ class AutocompleteInput extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <Autocomplete
|
return <Autocomplete
|
||||||
menuStyle={{
|
menuStyle={{
|
||||||
border: 'none',
|
border: 'none',
|
||||||
padding: '2px 0',
|
padding: '2px 0',
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
maxHeight: '50%',
|
maxHeight: '50%',
|
||||||
}}
|
background: colors.gray,
|
||||||
inputProps={{
|
zIndex: 3,
|
||||||
|
}}
|
||||||
|
inputProps={{
|
||||||
style: {
|
style: {
|
||||||
...input.input,
|
...input.input,
|
||||||
width: null,
|
width: null,
|
||||||
...this.props.style,
|
...this.props.style,
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
value={this.props.value}
|
value={this.props.value}
|
||||||
items={this.props.options}
|
items={this.props.options}
|
||||||
getItemValue={(item) => item[0]}
|
getItemValue={(item) => item[0]}
|
||||||
onSelect={v => this.props.onChange(v)}
|
onSelect={v => this.props.onChange(v)}
|
||||||
onChange={(e, v) => this.props.onChange(v)}
|
onChange={(e, v) => this.props.onChange(v)}
|
||||||
renderItem={(item, isHighlighted) => (
|
renderItem={(item, isHighlighted) => (
|
||||||
<div
|
<div
|
||||||
key={item[0]}
|
key={item[0]}
|
||||||
style={{
|
style={{
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
color: colors.lowgray,
|
color: colors.lowgray,
|
||||||
background: isHighlighted ? colors.midgray : colors.gray,
|
background: isHighlighted ? colors.midgray : colors.gray,
|
||||||
padding: margins[0],
|
padding: margins[0],
|
||||||
fontSize: fontSizes[5],
|
fontSize: fontSizes[5],
|
||||||
}}
|
zIndex: 3,
|
||||||
>
|
}}
|
||||||
{item[1]}
|
>
|
||||||
</div>
|
{item[1]}
|
||||||
)}
|
</div>
|
||||||
/>
|
)}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue