mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-2045] reset selection on toggle join action (#829)
This commit is contained in:
committed by
Denys Vuika
parent
32083576c3
commit
8952be634f
@@ -34,6 +34,7 @@ import {
|
||||
SnackbarErrorAction,
|
||||
SnackbarInfoAction
|
||||
} from '../../../store/actions/snackbar.actions';
|
||||
import { SetSelectedNodesAction } from '../../../store/actions/node.actions';
|
||||
|
||||
@Component({
|
||||
selector: 'app-toggle-join-library',
|
||||
@@ -98,6 +99,13 @@ export class ToggleJoinLibraryComponent {
|
||||
if (event.shouldReload) {
|
||||
this.content.libraryJoined.next();
|
||||
} else {
|
||||
if (event.updatedEntry) {
|
||||
this.store.dispatch(
|
||||
new SetSelectedNodesAction([
|
||||
<any>{ entry: event.updatedEntry, isLibrary: true }
|
||||
])
|
||||
);
|
||||
}
|
||||
this.content.joinLibraryToggle.next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ export class LibraryMembershipDirective implements OnChanges {
|
||||
this.targetSite.joinRequested = false;
|
||||
this.isJoinRequested.next(false);
|
||||
const info = {
|
||||
updatedEntry: this.targetSite,
|
||||
shouldReload: false,
|
||||
i18nKey: 'APP.MESSAGES.INFO.JOIN_CANCELED'
|
||||
};
|
||||
@@ -117,6 +118,7 @@ export class LibraryMembershipDirective implements OnChanges {
|
||||
this.toggle.emit(info);
|
||||
} else {
|
||||
const info = {
|
||||
updatedEntry: this.targetSite,
|
||||
shouldReload: false,
|
||||
i18nKey: 'APP.MESSAGES.INFO.JOIN_REQUESTED'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user