From a6ad6e076cd0518aaf85bc599a906cc7fff8e8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Sat, 8 Nov 2025 02:13:50 +0300 Subject: [PATCH] =?UTF-8?q?TreeList=20k=C4=B1sm=C4=B1nda=20Toolbar=20d?= =?UTF-8?q?=C3=BCzeltmesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/list/Tree.tsx | 13 ++++++------- ui/src/views/list/Utils.ts | 14 ++++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ui/src/views/list/Tree.tsx b/ui/src/views/list/Tree.tsx index 2e9fdddd..172792c1 100644 --- a/ui/src/views/list/Tree.tsx +++ b/ui/src/views/list/Tree.tsx @@ -27,10 +27,10 @@ import TreeListDx, { SearchPanel, Selection, Sorting, - StateStoring, + Toolbar, TreeListTypes, } from 'devextreme-react/tree-list' -import { Item, Toolbar } from 'devextreme-react/toolbar' +import { Item } from 'devextreme-react/toolbar' import CustomStore from 'devextreme/data/custom_store' import { useCallback, useEffect, useRef, useState } from 'react' import { Helmet } from 'react-helmet' @@ -644,15 +644,14 @@ const Tree = (props: TreeProps) => { setExtraFilters={setExtraFilters} /> - 0 || (filterToolbarData?.length ?? 0) > 0} - > + 0 || (filterToolbarData?.length ?? 0) > 0}> {toolbarData?.map((item) => ( - + ))} {filterToolbarData?.map((item) => ( - + ))} + {/* burada özel filtre alanını Template ile bağla */} {gridDto?.gridOptions.extraFilterDto?.length ? ( ) : null} diff --git a/ui/src/views/list/Utils.ts b/ui/src/views/list/Utils.ts index ea5448f2..4c3def6d 100644 --- a/ui/src/views/list/Utils.ts +++ b/ui/src/views/list/Utils.ts @@ -97,18 +97,20 @@ export function pivotFieldConvertDataType(fieldDbType?: DataType): PivotGridData } export function setGridPanelColor(color: any) { - const pnl1 = document.getElementsByClassName( + //DataGrid icin + const pnlGrid = document.getElementsByClassName( 'dx-datagrid-header-panel', ) as HTMLCollectionOf - if (pnl1?.length) { - pnl1[0].style.backgroundColor = color + if (pnlGrid?.length) { + pnlGrid[0].style.backgroundColor = color } - const pnl2 = document.getElementsByClassName( + //TreeList icin + const pnlTree = document.getElementsByClassName( 'dx-treelist-header-panel', ) as HTMLCollectionOf - if (pnl2?.length) { - pnl2[0].style.backgroundColor = color + if (pnlTree?.length) { + pnlTree[0].style.backgroundColor = color } }