Answer the question
In order to leave comments, you need to log in
Outputting more than 50 elements to Bitrix, how to display one object, not two?
Hello, tell me how to make the output of one object with 57 elements, and not first 50 and then another rest of 7. It is
necessary to overwrite, and not overwrite each time using map
getField() {
BX24.callMethod('entity.item.get', {
ENTITY: 'wheelfortune', SORT: {'ID': 'ASC'}
},
(result) => {
let sections = result.data();
this.fields = sections.map((field) => ({
ID: field.ID,
NAME: field.NAME,
SECTION: field.SECTION,
'IS_EDITFIELD': false
}))
console.log(this.fields);
if (result.more()) {
result.next();
}
});
},
Answer the question
In order to leave comments, you need to log in
based on WapSter 's answer , did this
getField() {
BX24.callMethod('entity.item.get', {
ENTITY: 'wheelfortune', SORT: {'ID': 'ASC'}
},
(result) => {
let sections = result.data();
let newSections = sections.map((field) => ({
ID: field.ID,
NAME: field.NAME,
SECTION: field.SECTION,
'IS_EDITFIELD': false
}))
this.fields = newSections.concat(this.fields);
if (result.more()) {
result.next();
}
});
},
getField() {
BX24.callMethod('entity.item.get', {
ENTITY: 'wheelfortune', SORT: {'ID': 'ASC'}
},
(result) => {
let sections = result.data();
const newSections = sections.map((field) => ({
ID: field.ID,
NAME: field.NAME,
SECTION: field.SECTION,
'IS_EDITFIELD': false
}))
this.fields.join(...newSections)
console.log(this.fields);
if (result.more()) {
result.next();
}
});
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question