Unverified Commit 3d0b219b authored by Hossein Ahmadian-Yazdi's avatar Hossein Ahmadian-Yazdi Committed by GitHub
Browse files

[MM-26762] Archived Channels are not shown in the System Console > Channels page (#5870)

* include delete flag set to true

* Fix types

* Fix not loading on not loading inital startup
parent 733e5cf4
......@@ -20,8 +20,8 @@ import LockIcon from 'components/widgets/icons/lock_icon';
import './channel_list.scss';
interface ChannelListProps {
actions: {
searchAllChannels: (term: string, notAssociatedToGroup?: string, excludeDefaultChannels?: boolean, page?: number, perPage?: number) => Promise<{ data: any }>;
getData: (page: number, perPage: number, notAssociatedToGroup? : string, excludeDefaultChannels?: boolean) => ActionFunc | ActionResult | Promise<ChannelWithTeamData[]>;
searchAllChannels: (term: string, notAssociatedToGroup?: string, excludeDefaultChannels?: boolean, page?: number, perPage?: number, includeDeleted?: boolean) => Promise<{ data: any }>;
getData: (page: number, perPage: number, notAssociatedToGroup? : string, excludeDefaultChannels?: boolean, includeDeleted?: boolean) => ActionFunc | ActionResult | Promise<ChannelWithTeamData[]>;
};
data: ChannelWithTeamData[];
total: number;
......@@ -80,7 +80,7 @@ export default class ChannelList extends React.PureComponent<ChannelListProps, C
return;
}
await this.props.actions.getData(page, PAGE_SIZE);
await this.props.actions.getData(page, PAGE_SIZE, '', false, true);
this.setState({page, loading: false});
}
......@@ -88,7 +88,7 @@ export default class ChannelList extends React.PureComponent<ChannelListProps, C
let channels = [];
let total = 0;
let searchErrored = true;
const response = await this.props.actions.searchAllChannels(term, '', false, page, PAGE_SIZE);
const response = await this.props.actions.searchAllChannels(term, '', false, page, PAGE_SIZE, true);
if (response?.data) {
channels = page > 0 ? this.state.channels.concat(response.data.channels) : response.data.channels;
total = response.data.total_count;
......
......@@ -32,8 +32,8 @@ function mapStateToProps(state: GlobalState) {
}
type Actions = {
searchAllChannels: (term: string, notAssociatedToGroup?: string, excludeDefaultChannels?: boolean, page?: number, perPage?: number) => Promise<{ data: any }>;
getData: (page: number, perPage: number, notAssociatedToGroup? : string, excludeDefaultChannels?: boolean) => ActionFunc | ActionResult | Promise<ChannelWithTeamData[]>;
searchAllChannels: (term: string, notAssociatedToGroup?: string, excludeDefaultChannels?: boolean, page?: number, perPage?: number, includeDeleted?: boolean) => Promise<{ data: any }>;
getData: (page: number, perPage: number, notAssociatedToGroup? : string, excludeDefaultChannels?: boolean, includeDeleted?: boolean) => ActionFunc | ActionResult | Promise<ChannelWithTeamData[]>;
}
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment