u
This commit is contained in:
@@ -35,11 +35,9 @@ import { article as articleApi } from '../../../api';
|
||||
import attributeAutomat, { selectAttributes } from '../../../automats/attributeAutomat';
|
||||
import artikelAutomat, { getArticle } from '../../../automats/artikelAutomat';
|
||||
import { notifyError } from '../../../utils/notify';
|
||||
import { StorageManagerContext } from '../../../api/storageManagerContext';
|
||||
import articleIndexAutomat from '../../../automats/articleIndexAutomat';
|
||||
|
||||
export default class ArticleViewLists extends PureComponent {
|
||||
static contextType = StorageManagerContext;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
const initialAttributes = selectAttributes() || [];
|
||||
@@ -167,13 +165,12 @@ export default class ArticleViewLists extends PureComponent {
|
||||
}
|
||||
|
||||
getApi() {
|
||||
return this.context?.article || articleApi;
|
||||
return articleApi;
|
||||
}
|
||||
|
||||
async loadAllArticles() {
|
||||
try {
|
||||
const data = await this.context?.articleIndexPromise;
|
||||
const articles = Array.isArray(data) ? data : (data?.articles || []);
|
||||
const articles = await articleIndexAutomat.actions.ensureLoaded();
|
||||
if (!this._cancelled) {
|
||||
this.setState({ allArticles: articles });
|
||||
}
|
||||
@@ -1316,7 +1313,7 @@ export default class ArticleViewLists extends PureComponent {
|
||||
}
|
||||
|
||||
renderStandardView(selectableAttributes, assignedAttributeIds) {
|
||||
const { busy, activeCreatorMode, selectedAttributeId, attributes } = this.state;
|
||||
const { busy, activeCreatorMode, selectedAttributeId } = this.state;
|
||||
return (
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>
|
||||
{activeCreatorMode === 'father' ? (
|
||||
@@ -1422,7 +1419,6 @@ export default class ArticleViewLists extends PureComponent {
|
||||
allArticles,
|
||||
busy,
|
||||
activeCreatorMode,
|
||||
activeListTab,
|
||||
selectedChildValueId,
|
||||
newChildText,
|
||||
isCustomChildValue,
|
||||
|
||||
Reference in New Issue
Block a user