mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 02:05:25 +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() {
|
||||
return <Autocomplete
|
||||
menuStyle={{
|
||||
border: 'none',
|
||||
return <Autocomplete
|
||||
menuStyle={{
|
||||
border: 'none',
|
||||
padding: '2px 0',
|
||||
position: 'fixed',
|
||||
overflow: 'auto',
|
||||
maxHeight: '50%',
|
||||
}}
|
||||
inputProps={{
|
||||
background: colors.gray,
|
||||
zIndex: 3,
|
||||
}}
|
||||
inputProps={{
|
||||
style: {
|
||||
...input.input,
|
||||
width: null,
|
||||
...input.input,
|
||||
width: null,
|
||||
...this.props.style,
|
||||
}
|
||||
}}
|
||||
}
|
||||
}}
|
||||
value={this.props.value}
|
||||
items={this.props.options}
|
||||
getItemValue={(item) => item[0]}
|
||||
onSelect={v => this.props.onChange(v)}
|
||||
items={this.props.options}
|
||||
getItemValue={(item) => item[0]}
|
||||
onSelect={v => this.props.onChange(v)}
|
||||
onChange={(e, v) => this.props.onChange(v)}
|
||||
renderItem={(item, isHighlighted) => (
|
||||
<div
|
||||
key={item[0]}
|
||||
style={{
|
||||
userSelect: 'none',
|
||||
color: colors.lowgray,
|
||||
background: isHighlighted ? colors.midgray : colors.gray,
|
||||
padding: margins[0],
|
||||
fontSize: fontSizes[5],
|
||||
}}
|
||||
>
|
||||
{item[1]}
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
renderItem={(item, isHighlighted) => (
|
||||
<div
|
||||
key={item[0]}
|
||||
style={{
|
||||
userSelect: 'none',
|
||||
color: colors.lowgray,
|
||||
background: isHighlighted ? colors.midgray : colors.gray,
|
||||
padding: margins[0],
|
||||
fontSize: fontSizes[5],
|
||||
zIndex: 3,
|
||||
}}
|
||||
>
|
||||
{item[1]}
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue