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,
|
SearchPanel,
|
||||||
Selection,
|
Selection,
|
||||||
Sorting,
|
Sorting,
|
||||||
StateStoring,
|
Toolbar,
|
||||||
TreeListTypes,
|
TreeListTypes,
|
||||||
} from 'devextreme-react/tree-list'
|
} 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 CustomStore from 'devextreme/data/custom_store'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
|
|
@ -644,15 +644,14 @@ const Tree = (props: TreeProps) => {
|
||||||
setExtraFilters={setExtraFilters}
|
setExtraFilters={setExtraFilters}
|
||||||
/>
|
/>
|
||||||
</Template>
|
</Template>
|
||||||
<Toolbar
|
<Toolbar visible={(toolbarData?.length ?? 0) > 0 || (filterToolbarData?.length ?? 0) > 0}>
|
||||||
visible={(toolbarData?.length ?? 0) > 0 || (filterToolbarData?.length ?? 0) > 0}
|
|
||||||
>
|
|
||||||
{toolbarData?.map((item) => (
|
{toolbarData?.map((item) => (
|
||||||
<Item key={item.name} {...item} />
|
<Item key={item.name} {...item}></Item>
|
||||||
))}
|
))}
|
||||||
{filterToolbarData?.map((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 ? (
|
{gridDto?.gridOptions.extraFilterDto?.length ? (
|
||||||
<Item location="before" template="extraFilters" cssClass="no-default" />
|
<Item location="before" template="extraFilters" cssClass="no-default" />
|
||||||
) : null}
|
) : null}
|
||||||
|
|
|
||||||
|
|
@ -97,18 +97,20 @@ export function pivotFieldConvertDataType(fieldDbType?: DataType): PivotGridData
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setGridPanelColor(color: any) {
|
export function setGridPanelColor(color: any) {
|
||||||
const pnl1 = document.getElementsByClassName(
|
//DataGrid icin
|
||||||
|
const pnlGrid = document.getElementsByClassName(
|
||||||
'dx-datagrid-header-panel',
|
'dx-datagrid-header-panel',
|
||||||
) as HTMLCollectionOf<HTMLElement>
|
) as HTMLCollectionOf<HTMLElement>
|
||||||
if (pnl1?.length) {
|
if (pnlGrid?.length) {
|
||||||
pnl1[0].style.backgroundColor = color
|
pnlGrid[0].style.backgroundColor = color
|
||||||
}
|
}
|
||||||
|
|
||||||
const pnl2 = document.getElementsByClassName(
|
//TreeList icin
|
||||||
|
const pnlTree = document.getElementsByClassName(
|
||||||
'dx-treelist-header-panel',
|
'dx-treelist-header-panel',
|
||||||
) as HTMLCollectionOf<HTMLElement>
|
) as HTMLCollectionOf<HTMLElement>
|
||||||
if (pnl2?.length) {
|
if (pnlTree?.length) {
|
||||||
pnl2[0].style.backgroundColor = color
|
pnlTree[0].style.backgroundColor = color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue