File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
lib/components/v2/projects
routes/v2/projects/[projectId]/workflows/[workflowId] Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1414 );
1515
1616 function createDatasetCallback (/** @type {import('$lib/types-v2').DatasetV2} */ newDataset ) {
17- datasets = [... datasets, newDataset];
17+ datasets = [... datasets, newDataset].sort ((a , b ) =>
18+ a .name < b .name ? - 1 : a .name > b .name ? 1 : 0
19+ );
1820 }
1921
2022 /**
Original file line number Diff line number Diff line change 9898
9999 $: updatableWorkflowList = workflow .task_list || [];
100100
101+ $: sortedDatasets = datasets .sort ((a , b ) => (a .name < b .name ? - 1 : a .name > b .name ? 1 : 0 ));
102+
101103 const updateJobsInterval = env .PUBLIC_UPDATE_JOBS_INTERVAL
102104 ? parseInt (env .PUBLIC_UPDATE_JOBS_INTERVAL )
103105 : 3000 ;
726728 on: change= {selectedDatasetChanged}
727729 >
728730 < option value= {undefined }> Select... < / option>
729- {#each datasets as dataset}
731+ {#each sortedDatasets as dataset}
730732 < option value= {dataset .id }> {dataset .name }< / option>
731733 {/ each}
732734 < / select>
11251127
11261128< RunWorkflowModal
11271129 {workflow}
1128- { datasets}
1130+ datasets= {sortedDatasets }
11291131 {selectedDatasetId}
11301132 {onJobSubmitted}
11311133 {statuses}
You can’t perform that action at this time.
0 commit comments