Fix popover visibility

DDF wizard and popover has some issues with visibility, this is a quick hack so we should try fix it a bit nicer, but for time being it's fine
This commit is contained in:
Karel Hala 2021-06-10 17:50:13 +02:00 committed by Sanne Raymaekers
parent 0c7a1500ec
commit 9a56b859ef
6 changed files with 6 additions and 4 deletions

View file

@ -7,6 +7,7 @@ const { config: webpackConfig, plugins } = config({
debug: true,
port: 8002,
useFileHash: false,
sassPrefix: '.image-builder, body',
skipChrome2: true,
});

View file

@ -5,6 +5,7 @@ const config = require('@redhat-cloud-services/frontend-components-config');
const { config: webpackConfig, plugins } = config({
rootFolder: resolve(__dirname, '../'),
skipChrome2: false,
sassPrefix: '.image-builder, body',
});
plugins.push(

View file

@ -2,7 +2,7 @@
padding-right: 0px;
}
.ins-c-image--builder__popover .pf-c-popover {
.pf-c-popover[data-popper-reference-hidden="true"] {
font-weight: initial;
visibility: initial;
pointer-events: initial;

View file

@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
const RadioWithPopover = ({ Popover, ...props }) => {
const ref = useRef();
return <Radio { ...props } label={ <span ref={ ref } className="ins-c-image--builder__popover">{props.label}
<Popover appendTo={ ref?.current } />
<Popover />
</span> } />;
};

View file

@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import { FormGroup, Tile, Grid, GridItem } from '@patternfly/react-core';
import { FormGroup, Tile } from '@patternfly/react-core';
import './TargetEnvironment.scss';
const TargetEnvironment = ({ label, isRequired, ...props }) => {

View file

@ -1,4 +1,4 @@
import React, { useRef } from 'react';
import React from 'react';
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
import { HelpIcon } from '@patternfly/react-icons';