TreeList kısmında Toolbar düzeltmesi
This commit is contained in:
parent
f3e187644c
commit
a6ad6e076c
2 changed files with 14 additions and 13 deletions
|
|
@ -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}
|
||||
/>
|
||||
</Template>
|
||||
<Toolbar
|
||||
visible={(toolbarData?.length ?? 0) > 0 || (filterToolbarData?.length ?? 0) > 0}
|
||||
>
|
||||
<Toolbar visible={(toolbarData?.length ?? 0) > 0 || (filterToolbarData?.length ?? 0) > 0}>
|
||||
{toolbarData?.map((item) => (
|
||||
<Item key={item.name} {...item} />
|
||||
<Item key={item.name} {...item}></Item>
|
||||
))}
|
||||
{filterToolbarData?.map((item) => (
|
||||
<Item key={item.name} {...item} />
|
||||
<Item key={item.name} {...item}></Item>
|
||||
))}
|
||||
{/* burada özel filtre alanını Template ile bağla */}
|
||||
{gridDto?.gridOptions.extraFilterDto?.length ? (
|
||||
<Item location="before" template="extraFilters" cssClass="no-default" />
|
||||
) : null}
|
||||
|
|
|
|||
|
|
@ -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<HTMLElement>
|
||||
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<HTMLElement>
|
||||
if (pnl2?.length) {
|
||||
pnl2[0].style.backgroundColor = color
|
||||
if (pnlTree?.length) {
|
||||
pnlTree[0].style.backgroundColor = color
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue