forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maps] fix selecting EMS basemap does not populate input (elastic#92711…
…) (elastic#92944) * [Maps] fix selecting EMS basemap does not populate input * tslint
- Loading branch information
Showing
3 changed files
with
68 additions
and
17 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
x-pack/plugins/maps/public/classes/sources/ems_tms_source/create_source_editor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React, { Component } from 'react'; | ||
import { EuiPanel } from '@elastic/eui'; | ||
import { EmsTmsSourceConfig, TileServiceSelect } from './tile_service_select'; | ||
|
||
interface Props { | ||
onTileSelect: (sourceConfig: EmsTmsSourceConfig) => void; | ||
} | ||
|
||
interface State { | ||
config?: EmsTmsSourceConfig; | ||
} | ||
|
||
export class CreateSourceEditor extends Component<Props, State> { | ||
state: State = {}; | ||
|
||
componentDidMount() { | ||
this._onTileSelect({ id: null, isAutoSelect: true }); | ||
} | ||
|
||
_onTileSelect = (config: EmsTmsSourceConfig) => { | ||
this.setState({ config }); | ||
this.props.onTileSelect(config); | ||
}; | ||
|
||
render() { | ||
return ( | ||
<EuiPanel> | ||
<TileServiceSelect onTileSelect={this._onTileSelect} config={this.state.config} /> | ||
</EuiPanel> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters