How to fix First Character Only bug

血红的双手。 提交于 2019-12-13 03:47:03

问题


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.

来源:https://stackoverflow.com/questions/57332313/how-to-fix-first-character-only-bug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!