How to fix First Character Only bug

2019-08-20 07:49发布

I am facing a complex bug where two json fields, the name and the description, only show their first character on a table every now and then randomly for no apparent reason. Has anyone ran into this issue? Attached screenshots of behavior below.

My web stack consists of a golang api get request being called using axios by a react frontend where I feed a react table component.

Table with first character only bug

Table with expected result

Axios Call

fetchMaintenanceEventsData() {
        let parent = this;
        console.log('Fetching Maintenance Events Data');
        this.setState({
            maintenanceEventsData: [],
            maintenanceEventsDataLoading: true
        });
        axios.get(`server-status/events`)
            .then((res) => {
                // console.log('res.data: ', res.data);
                parent.setState({
                    maintenanceEventsData: res.data,
                    maintenanceEventsDataLoading: false
                });
            })
            .catch((error) => {
                console.log("Error:", error);
                parent.setState({
                    maintenanceEventsDataLoading: false
                })
            });
    }

I expect the table fields to display completely 100% of the time.

0条回答
登录 后发表回答