[Vuejs]-VueJS handle multiple promise on page load

0👍

i think because you try to use then of response of another then

Try that

        getFieldsLabels: function () {
            return Promise.all(
                this.fields
                    .map((field) => Schema().getField(field))
            )
        }

You need to add getLabel to the the mounted function

        this.getFieldsLabels().then(
            response => {
                this.loaded = true;
                this.labels = response.getLabel()
            }
        )

Leave a comment