Skip to content

Commit

Permalink
fix(core/pipeline): Disable pipeline sorting when filtering by name (…
Browse files Browse the repository at this point in the history
…because some pipelines are hidden)
  • Loading branch information
christopherthielen committed Jul 30, 2021
1 parent 9cc7807 commit 1e06186
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions packages/core/src/pipeline/filter/ExecutionFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ export class ExecutionFilters extends React.Component<IExecutionFiltersProps, IE
newPipelineNames = newPipelineNames.filter((pipelineName) =>
pipelineName.toLocaleLowerCase().includes(searchString.toLocaleLowerCase()),
);
if (this.state.pipelineReorderEnabled) {
this.disablePipelineReorder();
}
}
const newStrategyNames = this.getPipelineNames(true);
if (!isEqual(pipelineNames, newPipelineNames) || !isEqual(strategyNames, newStrategyNames)) {
Expand Down Expand Up @@ -268,14 +271,22 @@ export class ExecutionFilters extends React.Component<IExecutionFiltersProps, IE
{pipelineNames.length > 0 && (
<div>
{!pipelineReorderEnabled && (
<a className="btn btn-xs btn-default clickable" onClick={this.enablePipelineReorder}>
<button
className="btn btn-xs btn-default"
onClick={this.enablePipelineReorder}
disabled={Boolean(searchString)}
>
Reorder Pipelines
</a>
</button>
)}
{pipelineReorderEnabled && (
<a className="btn btn-xs btn-default clickable" onClick={this.disablePipelineReorder}>
<button
className="btn btn-xs btn-default"
onClick={this.disablePipelineReorder}
disabled={Boolean(searchString)}
>
Done
</a>
</button>
)}
</div>
)}
Expand Down

0 comments on commit 1e06186

Please sign in to comment.