Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIPFIMP-52: React-highlighter is incompatible with react 17 #129

Merged
merged 1 commit into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change history for ui-plugin-find-import-profile

## **5.4.0** (in progress)

### Bugs fixed:
* React-highlighter is incompatible with react 17 (UIPFIMP-52)

## [5.3.0](https://github.com/folio-org/ui-plugin-find-import-profile/tree/v5.3.0) (2022-10-27)

### Features added:
Expand Down
10 changes: 10 additions & 0 deletions FindImportProfile/FindImportProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
ENTITY_KEYS,
PROFILE_NAMES,
} from '@folio/data-import/src/utils/constants';
import { listTemplate } from '@folio/data-import/src/components/ListTemplate';
zburke marked this conversation as resolved.
Show resolved Hide resolved

import * as containers from './FindImportProfileContainer';
import { fetchAssociations } from './utils/fetchAssociations';
Expand Down Expand Up @@ -50,6 +51,7 @@ const FindImportProfile = ({
const [confirmationLabel, setConfirmationLabel] = useState(null);
const [confirmationHeading, setConfirmationHeading] = useState(null);
const [confirmationMessage, setConfirmationMessage] = useState([]);
const [searchTerm, setSearchTerm] = useState('');

const handleProfilesSelect = (associations, confirmationModalMessage, records, callback) => {
setIsLinkingAllowed(true);
Expand Down Expand Up @@ -187,6 +189,13 @@ const FindImportProfile = ({
>
{viewProps => (
<PluginFindRecordModal
onSearchChange={term => setSearchTerm(term)}
resultsFormatter={listTemplate({
entityKey,
searchTerm,
selectRecord: null,
selectedRecords: [],
})}
{...viewProps}
{...modalProps}
isMultiSelect={!isSingleSelect}
Expand All @@ -199,6 +208,7 @@ const FindImportProfile = ({
...modalProps,
})}
closeModal={() => {
setSearchTerm('');
modalProps.closeModal();
onClose();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {

import { stripesShape } from '@folio/stripes/core';
import { StripesConnectedSource } from '@folio/stripes/smart-components';
import { listTemplate } from '@folio/data-import/src/components/ListTemplate';

const idPrefix = 'uiPluginFindImportProfile-';

Expand Down Expand Up @@ -61,13 +60,6 @@ export class AbstractContainer extends Component {
profileShape,
} = props;

const resultsFormatter = listTemplate({
entityKey,
searchTerm: '',
selectRecord: null,
selectedRecords: [],
});

if (this.source) {
this.source.update(this.props);
}
Expand All @@ -86,7 +78,6 @@ export class AbstractContainer extends Component {
queryGetter: this.queryGetter,
querySetter: this.querySetter,
renderFilters: noop,
resultsFormatter,
visibleColumns: get(profileShape, 'visibleColumns', []),
sortableColumns: get(profileShape, 'visibleColumns', []),
source: this.source,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"classnames": "^2.2.5",
"lodash": "^4.16.4",
"prop-types": "^15.6.0",
"react-highlighter": "^0.4.3",
"redux-form": "^8.3.7"
},
"peerDependencies": {
Expand Down