Skip to content

Commit

Permalink
fix(core): Build triggers: Properly render large number of jobs (#7056)
Browse files Browse the repository at this point in the history
The react Select component does not render a large number of jobs very well. In our environment it freezes the browser for ~30 seconds after every typed letter. VirtualizedSelect seems to handle this a lot better.
  • Loading branch information
jervi authored and anotherchrisberry committed May 23, 2019
1 parent 9a460f8 commit 8dd1417
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import Select, { Option } from 'react-select';
import VirtualizedSelect from 'react-virtualized-select';
import { Observable, Subject } from 'rxjs';

import { BaseTrigger } from 'core/pipeline';
Expand Down Expand Up @@ -123,7 +124,7 @@ export class BaseBuildTrigger extends React.Component<IBaseBuildTriggerConfigPro
return (
<>
{jobsLoaded && (
<Select
<VirtualizedSelect
className="form-control input-sm"
options={jobs.map(j => ({ label: j, value: j }))}
placeholder={'Select a job...'}
Expand Down

0 comments on commit 8dd1417

Please sign in to comment.