Fixed Bug 57763 - Сlient.OformsGallery. Fixed form creation after back from form gallery page

This commit is contained in:
Nikita Gopienko 2022-06-23 15:19:17 +03:00
parent 4b513bef15
commit 67f276e0d0

View File

@ -14,9 +14,17 @@ import FilesFilter from "@appserver/common/api/files/filter";
import { combineUrl } from "@appserver/common/utils";
const SectionHeaderContent = (props) => {
const { t, history, match, isInfoPanelVisible, toggleInfoPanel } = props;
const {
t,
history,
match,
isInfoPanelVisible,
toggleInfoPanel,
setGallerySelected,
} = props;
const onBackToFiles = () => {
setGallerySelected(null);
const filter = FilesFilter.getDefault();
filter.folder = match.params.folderId;
const urlFilter = filter.toUrlParams();
@ -58,10 +66,12 @@ const SectionHeaderContent = (props) => {
);
};
export default inject(({ auth }) => {
export default inject(({ auth, filesStore }) => {
const { toggleIsVisible, isVisible } = auth.infoPanelStore;
const { setGallerySelected } = filesStore;
return {
toggleInfoPanel: toggleIsVisible,
isInfoPanelVisible: isVisible,
setGallerySelected,
};
})(withTranslation("Common")(withRouter(observer(SectionHeaderContent))));