Skip to content
Snippets Groups Projects
Commit d33aab9f authored by chris's avatar chris
Browse files

fix tool rerender

parent 6f50e6cb
No related branches found
No related tags found
1 merge request!396add inputs
import React from 'react';
import React, { useMemo } from 'react';
import { injectable, inject } from 'inversify';
import { isEmpty } from 'lodash';
import { v4 as uuidv4 } from 'uuid';
......@@ -26,10 +26,13 @@ class MultipleChoiceDropDown extends ToolGroup {
renderTools(view) {
if (isEmpty(view)) return null;
return (
// eslint-disable-next-line no-underscore-dangle
<DropDownComponent key={uuidv4()} tools={this._tools} view={view} />
const MultipleDropDown = useMemo(
() => (
<DropDownComponent key={uuidv4()} tools={this._tools} view={view} />
),
[],
);
return MultipleDropDown;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment