File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131</template >
3232
3333<script >
34- import InfiniteScrollSelect from ' @/components/widgets/InfiniteScrollSelect.vue '
34+ import InfiniteScrollSelect from ' @/components/widgets/InfiniteScrollSelect'
3535
3636export default {
3737 name: ' ProjectMenu' ,
Original file line number Diff line number Diff line change @@ -125,7 +125,12 @@ export default {
125125 this .totalCount = response .count || 0
126126 }
127127 const newOpts = response[this .resourceType ] || []
128- this .options = this .options .concat (newOpts)
128+ const existingIds = new Set (this .options .map (o => o .id ))
129+ newOpts .forEach (opt => {
130+ if (! existingIds .has (opt .id )) {
131+ this .options .push (opt)
132+ }
133+ })
129134 this .page ++
130135
131136 if (this .preselectedOptionId && this .successiveFetches < this .maxSuccessiveFetches ) {
You can’t perform that action at this time.
0 commit comments