Skip to content

Commit

Permalink
Merge pull request #1498 from smeup/fix-merge-problem
Browse files Browse the repository at this point in the history
fixed merge problem
  • Loading branch information
Sme.UP authored Oct 20, 2022
2 parents 4c6aa24 + ec8033f commit 1a11151
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/ketchup-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sme.up/ketchup-react",
"version": "2.0.0",
"version": "6.6.0",
"exports": "./dist/index.js",
"types": "dist/index.d.ts",
"keywords": [
Expand Down
23 changes: 5 additions & 18 deletions packages/ketchup/src/components/kup-tree/kup-tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ export class KupTree {
*/
private columnMenuCard: HTMLKupCardElement = null;
private treeWrapperRef: KupScrollOnHoverElement;
private selectedColumn: string = '';
private clickTimeout: any[] = [];
private globalFilterTimeout: number;
private footer: { [index: string]: number };
Expand Down Expand Up @@ -1048,11 +1049,6 @@ export class KupTree {
(this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
!treeNodeData.expandable)
) {
const td = e
? this.getEventPath(e.target).find((el) => {
if (el.tagName === 'TD') return el;
})
: null;
// If this TreeNode is not disabled, then it can be selected and an event is emitted
if (treeNodeData && !treeNodeData.disabled) {
this.selectedNode = treeNodePath
Expand All @@ -1067,6 +1063,7 @@ export class KupTree {
columnName: this.selectedColumn,
});
}
this.selectedColumn = '';
}

// If KupTreeExpansionMode.NODE then click is a collapse/expand click
Expand Down Expand Up @@ -1585,18 +1582,12 @@ export class KupTree {

// When can be expanded OR selected
if (!treeNodeData.disabled) {
treeNodeOptions['onClick'] = (e: MouseEvent) => {
// Note: event must be cloned
// otherwise inside setTimeout will be exiting the Shadow DOM scope(causing loss of information, including target).
const clone: GenericObject = {};
for (const key in e) {
clone[key] = e[key];
}
treeNodeOptions['onClick'] = () => {
this.clickTimeout.push(
setTimeout(
() =>
(e: MouseEvent) =>
this.hdlTreeNodeClick(
clone as MouseEvent,
e,
treeNodeData,
treeNodePath
),
Expand All @@ -1609,10 +1600,6 @@ export class KupTree {
// When a tree node is displayed as a table
let treeNodeCells: JSX.Element[] | null = null;
let visibleCols = this.getVisibleColumns();

const _hasTooltip: boolean = !this.kupManager.objects.isEmptyKupObj(
treeNodeData.obj
);
if (this.showColumns && visibleCols && visibleCols.length) {
treeNodeCells = [];
// Renders all the cells
Expand Down

0 comments on commit 1a11151

Please sign in to comment.