Skip to content

Commit

Permalink
ERM-3431, License Export as CSV does not result in file download
Browse files Browse the repository at this point in the history
  • Loading branch information
MonireRasouli committed Nov 22, 2024
1 parent accf810 commit d36cd4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/DocumentFilter/DocumentFilterField.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MemoryRouter } from 'react-router-dom';
import { FieldArray } from 'react-final-form-arrays';

import { screen, waitFor } from '@folio/jest-config-stripes/testing-library/react';
import { waitFor } from '@folio/jest-config-stripes/testing-library/react';
import { renderWithIntl, TestForm, Button } from '@folio/stripes-erm-testing';

import { translationsProperties } from '../../test/jest/helpers';
Expand Down
2 changes: 1 addition & 1 deletion lib/DocumentFilter/DocumentFilterForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,4 @@ describe('DocumentFilterForm', () => {
});
});
});
});
});
7 changes: 3 additions & 4 deletions lib/utils/downloadBlob.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ const downloadBlob = (
}

return blob => {
const url = window.URL.createObjectURL(blob);
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = downloadName;
document.body.appendChild(a);
a.click();
a.remove();
a.dispatchEvent(new MouseEvent('click', { bubbles: true }));
URL.revokeObjectURL(url);
};
};

Expand Down

0 comments on commit d36cd4a

Please sign in to comment.