mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Make onChange in CodeEditor optional (#107128)
* Make onChang in CodeEditor optional * Update api docs
This commit is contained in:
parent
c98ffa5339
commit
ff3029f1b7
9 changed files with 5 additions and 44 deletions
|
@ -3719,48 +3719,15 @@
|
|||
"label": "onChange",
|
||||
"description": [],
|
||||
"signature": [
|
||||
"(value: string, event: ",
|
||||
"((value: string, event: ",
|
||||
"editor",
|
||||
".IModelContentChangedEvent) => void"
|
||||
".IModelContentChangedEvent) => void) | undefined"
|
||||
],
|
||||
"source": {
|
||||
"path": "src/plugins/kibana_react/public/url_template_editor/url_template_editor.tsx",
|
||||
"lineNumber": 27
|
||||
},
|
||||
"deprecated": false,
|
||||
"returnComment": [],
|
||||
"children": [
|
||||
{
|
||||
"parentPluginId": "kibanaReact",
|
||||
"id": "def-public.value",
|
||||
"type": "string",
|
||||
"tags": [],
|
||||
"label": "value",
|
||||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/kibana_react/public/code_editor/code_editor.tsx",
|
||||
"lineNumber": 37
|
||||
},
|
||||
"deprecated": false
|
||||
},
|
||||
{
|
||||
"parentPluginId": "kibanaReact",
|
||||
"id": "def-public.event",
|
||||
"type": "Object",
|
||||
"tags": [],
|
||||
"label": "event",
|
||||
"description": [],
|
||||
"signature": [
|
||||
"editor",
|
||||
".IModelContentChangedEvent"
|
||||
],
|
||||
"source": {
|
||||
"path": "src/plugins/kibana_react/public/code_editor/code_editor.tsx",
|
||||
"lineNumber": 37
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
]
|
||||
"deprecated": false
|
||||
},
|
||||
{
|
||||
"parentPluginId": "kibanaReact",
|
||||
|
|
|
@ -18,7 +18,7 @@ import kibanaReactObj from './kibana_react.json';
|
|||
|
||||
| Public API count | Any count | Items lacking comments | Missing exports |
|
||||
|-------------------|-----------|------------------------|-----------------|
|
||||
| 260 | 5 | 230 | 4 |
|
||||
| 258 | 5 | 228 | 4 |
|
||||
|
||||
## Client
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@ export const JsonCodeEditorCommon = ({
|
|||
languageId={XJsonLang.ID}
|
||||
width={width}
|
||||
value={jsonValue || ''}
|
||||
onChange={() => {}}
|
||||
editorDidMount={onEditorDidMount}
|
||||
aria-label={codeEditorAriaLabel}
|
||||
options={{
|
||||
|
|
|
@ -546,7 +546,6 @@ exports[`Source Viewer component renders json code editor 1`] = `
|
|||
aria-label="Read only JSON view of an elasticsearch document"
|
||||
editorDidMount={[Function]}
|
||||
languageId="xjson"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
Object {
|
||||
"automaticLayout": true,
|
||||
|
|
|
@ -54,7 +54,6 @@ export const RequestCodeViewer = ({ json }: RequestCodeViewerProps) => (
|
|||
<CodeEditor
|
||||
languageId={XJsonLang.ID}
|
||||
value={json}
|
||||
onChange={() => {}}
|
||||
options={{
|
||||
readOnly: true,
|
||||
lineNumbers: 'off',
|
||||
|
|
|
@ -34,7 +34,7 @@ export interface Props {
|
|||
value: string;
|
||||
|
||||
/** Function invoked when text in editor is changed */
|
||||
onChange: (value: string, event: monaco.editor.IModelContentChangedEvent) => void;
|
||||
onChange?: (value: string, event: monaco.editor.IModelContentChangedEvent) => void;
|
||||
|
||||
/**
|
||||
* Options for the Monaco Code Editor
|
||||
|
|
|
@ -74,7 +74,6 @@ export const SpecViewer = ({ vegaAdapter, ...rest }: SpecViewerProps) => {
|
|||
<CodeEditor
|
||||
languageId={XJsonLang.ID}
|
||||
value={spec}
|
||||
onChange={() => {}}
|
||||
options={{
|
||||
readOnly: true,
|
||||
lineNumbers: 'off',
|
||||
|
|
|
@ -35,7 +35,6 @@ const InspectFlyout = ({ uiSettings, searchSession }: InspectFlyoutProps) => {
|
|||
<CodeEditor
|
||||
languageId="json"
|
||||
value={JSON.stringify(searchSession.initialState, null, 2)}
|
||||
onChange={() => {}}
|
||||
options={{
|
||||
readOnly: true,
|
||||
lineNumbers: 'off',
|
||||
|
|
|
@ -75,7 +75,6 @@ export class ImportCompleteView extends Component<Props, {}> {
|
|||
<CodeEditor
|
||||
languageId="json"
|
||||
value={jsonAsString}
|
||||
onChange={() => {}}
|
||||
options={{
|
||||
readOnly: true,
|
||||
lineNumbers: 'off',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue