Skip to content
Open
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
8 changes: 0 additions & 8 deletions components/lib/panelmenu/PanelMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const PanelMenu = React.memo(
const [idState, setIdState] = React.useState(props.id);
const [activeItemState, setActiveItemState] = React.useState(null);
const [activeItemsState, setActiveItemsState] = React.useState([]);
const [animationDisabled, setAnimationDisabled] = React.useState(false);
const elementRef = React.useRef(null);

const { ptm, cx, isUnstyled } = PanelMenuBase.setMetaData({
Expand Down Expand Up @@ -250,8 +249,6 @@ export const PanelMenu = React.memo(
});

React.useEffect(() => {
setAnimationDisabled(true);

props.model &&
props.model.forEach((item) => {
if (item.expanded) {
Expand All @@ -261,10 +258,6 @@ export const PanelMenu = React.memo(
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.model]);

const onEnter = () => {
setAnimationDisabled(false);
};

const createPanel = (item, index) => {
if (!isItemVisible(item)) {
return null;
Expand Down Expand Up @@ -389,7 +382,6 @@ export const PanelMenu = React.memo(
{
classNames: cx('transition'),
timeout: { enter: 1000, exit: 450 },
onEnter: onEnter,
in: active,
unmountOnExit: true,
options: props.transitionOptions
Expand Down
2 changes: 0 additions & 2 deletions components/lib/tree/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ export const Tree = React.memo(
setFilterValueState(ObjectUtils.isNotEmpty(value) ? value : '');
};

const childNodeFocus = (node) => {};

const _filter = () => {
if (!filterChanged.current) return;

Expand Down
70 changes: 0 additions & 70 deletions components/lib/tree/TreeBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,76 +38,6 @@ const classes = {
footer: 'p-tree-footer'
};

const styles = `
.p-tree-container {
margin: 0;
padding: 0;
list-style-type: none;
overflow: auto;
}

.p-treenode-children {
margin: 0;
padding: 0;
list-style-type: none;
}

.p-treenode-selectable {
cursor: pointer;
user-select: none;
}

.p-tree-toggler {
cursor: pointer;
user-select: none;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
overflow: hidden;
position: relative;
}

.p-treenode-leaf > .p-treenode-content .p-tree-toggler {
visibility: hidden;
}

.p-treenode-content {
display: flex;
align-items: center;
}

.p-tree-filter {
width: 100%;
}

.p-tree-filter-container {
position: relative;
display: block;
width: 100%;
}

.p-tree-filter-icon {
position: absolute;
top: 50%;
margin-top: -.5rem;
}

.p-tree-loading {
position: relative;
min-height: 4rem;
}

.p-tree .p-tree-loading-overlay {
position: absolute;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
}

`;

export const TreeBase = ComponentBase.extend({
defaultProps: {
__TYPE: 'Tree',
Expand Down
1 change: 0 additions & 1 deletion components/lib/treetable/TreeTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,6 @@ export const TreeTable = React.forwardRef((inProps, ref) => {

if (draggedColumnEl.current !== dropHeader) {
let targetLeft = dropHeaderOffset.left - containerOffset.left;
//let targetTop = containerOffset.top - dropHeaderOffset.top;
let columnCenter = dropHeaderOffset.left + dropHeader.offsetWidth / 2;

reorderIndicatorUpRef.current.style.top = dropHeaderOffset.top - containerOffset.top - (iconHeight.current - 1) + 'px';
Expand Down
6 changes: 0 additions & 6 deletions components/lib/treetable/TreeTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ export const TreeTableRow = React.memo((props) => {
return ptm(key, rowMetadata);
};

const isLeaf = () => {
return props.node.leaf === false ? false : !(props.node.children && props.node.children.length);
};

const onTogglerClick = (event) => {
expanded ? collapse(event) : expand(event);

Expand Down Expand Up @@ -336,7 +332,6 @@ export const TreeTableRow = React.memo((props) => {

const onArrowRightKey = (event) => {
const ishiddenIcon = DomHandler.findSingle(event.currentTarget, 'button').style.visibility === 'hidden';
const togglerElement = DomHandler.findSingle(elementRef.current, '[data-pc-section="rowtoggler"]');

if (ishiddenIcon) {
return;
Expand All @@ -354,7 +349,6 @@ export const TreeTableRow = React.memo((props) => {

const currentTarget = event.currentTarget;
const ishiddenIcon = DomHandler.findSingle(currentTarget, 'button').style.visibility === 'hidden';
const togglerElement = DomHandler.findSingle(currentTarget, '[data-pc-section="rowtoggler"]');

if (expanded && !ishiddenIcon) {
collapse(event);
Expand Down
Loading