diff --git a/changelogs/unreleased/88573.json b/changelogs/unreleased/88573.json new file mode 100644 index 000000000..685c733cb --- /dev/null +++ b/changelogs/unreleased/88573.json @@ -0,0 +1,5 @@ +{ + "title": "SearchTreeView: add onParentChange props to get parent update", + "type": "feat", + "packages": "core" +} diff --git a/packages/apps/dms/src/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.tsx b/packages/apps/dms/src/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.tsx index 85337c59a..344b4cffb 100644 --- a/packages/apps/dms/src/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.tsx +++ b/packages/apps/dms/src/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.tsx @@ -17,8 +17,9 @@ */ import React, {useCallback, useMemo} from 'react'; +import {StyleSheet} from 'react-native'; import {useDispatch, useSelector, useTranslator} from '@axelor/aos-mobile-core'; -import {AutoCompleteSearch} from '@axelor/aos-mobile-ui'; +import {AutoCompleteSearch, Label} from '@axelor/aos-mobile-ui'; import {searchDirectory} from '../../../features/documentSlice'; interface ParentDirectorySearchBarProps { @@ -28,6 +29,7 @@ interface ParentDirectorySearchBarProps { onChange?: (any: any) => void; readonly?: boolean; required?: boolean; + displayRootInfo?: boolean; } const ParentDirectorySearchBar = ({ @@ -37,6 +39,7 @@ const ParentDirectorySearchBar = ({ onChange = () => {}, readonly = false, required = false, + displayRootInfo = false, }: ParentDirectorySearchBarProps) => { const I18n = useTranslator(); const dispatch = useDispatch(); @@ -69,26 +72,42 @@ const ParentDirectorySearchBar = ({ ); return ( - item.fileName} - placeholder={I18n.t(title)} - showDetailsPopup={true} - loadingList={loadingDirectory} - moreLoading={moreLoadingDirectory} - isListEnd={isListEndDirectory} - navigate={false} - oneFilter={false} - translator={I18n.t} - /> + <> + item.fileName} + placeholder={I18n.t(title)} + showDetailsPopup={true} + loadingList={loadingDirectory} + moreLoading={moreLoadingDirectory} + isListEnd={isListEndDirectory} + navigate={false} + oneFilter={false} + translator={I18n.t} + /> + {displayRootInfo && ( +