Merge pull request #1246 from umbraco/feature/unify-language-collections
The same amount of languages are not always requested
This commit is contained in:
@@ -41,7 +41,7 @@ export class UmbDictionaryTableCollectionViewElement extends UmbLitElement {
|
||||
async #observeCollectionItems() {
|
||||
if (!this.#collectionContext) return;
|
||||
|
||||
const { data: languageData } = await this.#languageCollectionRepository.requestCollection({ skip: 0, take: 1000 });
|
||||
const { data: languageData } = await this.#languageCollectionRepository.requestCollection({});
|
||||
if (!languageData) return;
|
||||
|
||||
this.observe(
|
||||
|
||||
@@ -28,7 +28,7 @@ export class UmbWorkspaceViewDictionaryEditorElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
async firstUpdated() {
|
||||
const { data } = await this.#languageCollectionRepository.requestCollection({ skip: 0, take: 200 });
|
||||
const { data } = await this.#languageCollectionRepository.requestCollection({});
|
||||
if (data) {
|
||||
this._languages = data.items;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class UmbCultureAndHostnamesModalElement extends UmbModalBaseElement<
|
||||
}
|
||||
|
||||
async #requestLanguages() {
|
||||
const { data } = await this.#languageCollectionRepository.requestCollection({ skip: 0, take: 500 });
|
||||
const { data } = await this.#languageCollectionRepository.requestCollection({});
|
||||
if (!data) return;
|
||||
this._languageModel = data.items;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export class UmbAppLanguageSelectElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
async #observeLanguages() {
|
||||
const { data } = await this.#collectionRepository.requestCollection({ skip: 0, take: 1000 });
|
||||
const { data } = await this.#collectionRepository.requestCollection({});
|
||||
|
||||
// TODO: listen to changes
|
||||
if (data) {
|
||||
|
||||
@@ -25,7 +25,7 @@ export class UmbLanguagePickerModalElement extends UmbModalBaseElement<
|
||||
}
|
||||
|
||||
async firstUpdated() {
|
||||
const { data } = await this.#collectionRepository.requestCollection({ skip: 0, take: 1000 });
|
||||
const { data } = await this.#collectionRepository.requestCollection({});
|
||||
this._languages = data?.items ?? [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user