Skip to content

Commit

Permalink
move constant out of component
Browse files Browse the repository at this point in the history
  • Loading branch information
gsfk committed Jan 7, 2025
1 parent 72eab4e commit 07cd5e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/discovery/DiscoverySearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const ADD_CONDITION_WRAPPER_COL = {

const conditionLabel = (i) => `Condition ${i + 1}`;

const CONDITION_RULES = [{ validator: conditionValidator }];

const PhenopacketDropdownOption = ({ option: { path, ui_name: uiName }, getDataTypeFieldSchema }) => (
<Tooltip title={getDataTypeFieldSchema(`[dataset item].${path}`).description} mouseEnterDelay={TOOLTIP_DELAY_SECONDS}>
{uiName}
Expand All @@ -59,8 +61,6 @@ PhenopacketDropdownOption.propTypes = {
const DiscoverySearchForm = ({ onChange, dataType, setFormRef, handleVariantHiddenFieldChange }) => {
const [form] = Form.useForm();

const CONDITION_RULES = [{ validator: conditionValidator }];

useEffect(() => {
if (setFormRef) setFormRef(form);
}, [form, setFormRef]);
Expand Down

0 comments on commit 07cd5e4

Please sign in to comment.