-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): fix jumping cursor in trigger inputs (#7486)
- Loading branch information
1 parent
36192ab
commit 8529faf
Showing
5 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
app/scripts/modules/core/src/pipeline/config/triggers/TriggersWrapper.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,15 @@ | ||
import * as React from 'react'; | ||
|
||
import { IPipeline } from 'core/domain'; | ||
import { ITriggersProps, Triggers } from 'core/pipeline'; | ||
|
||
export class TriggersWrapper extends React.Component<ITriggersProps> { | ||
private updatePipelineConfig = (changes: Partial<IPipeline>): void => { | ||
this.props.updatePipelineConfig(changes); | ||
this.forceUpdate(); | ||
}; | ||
|
||
public render() { | ||
return <Triggers {...this.props} updatePipelineConfig={this.updatePipelineConfig} />; | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
app/scripts/modules/core/src/pipeline/config/triggers/triggers.module.ts
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { module } from 'angular'; | ||
import { react2angular } from 'react2angular'; | ||
|
||
import { Triggers } from './Triggers'; | ||
import { TriggersWrapper } from './TriggersWrapper'; | ||
import { ARTIFACT_MODULE } from './artifacts/artifact.module'; | ||
|
||
export const TRIGGERS = 'spinnaker.core.pipeline.config.trigger.triggersDirective'; | ||
module(TRIGGERS, [ARTIFACT_MODULE]).component( | ||
'triggers', | ||
react2angular(Triggers, ['application', 'pipeline', 'fieldUpdated', 'updatePipelineConfig', 'viewState']), | ||
react2angular(TriggersWrapper, ['application', 'pipeline', 'fieldUpdated', 'updatePipelineConfig', 'viewState']), | ||
); |
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