nhn / tui.grid

🍞🔡 The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
http://ui.toast.com/tui-grid/
MIT License
2.4k stars 386 forks source link

when setValue is called, _attributes is lost #1976

Open seho-dev opened 9 months ago

seho-dev commented 9 months ago

Describe the bug When setValue is called, _attributes is lost

To Reproduce I tried to add row to the last row of the table

 gridInstance.appendRows([
            {
              _attributes: {
                // 由于组件没有colspan功能,用样式去伪装一个colspan效果
                className: {
                  row: ['not-click-row'],
                  column: {
                    发行规模: ['border'],
                    当前余额: ['border'],
                  },
                },
              },
            },
          ]);

Then I expect to change the value of a column in the last row

gridInstance.setValue(
    gridData[gridData.length - 1].rowKey,
    '发行规模',
    '1212',
  );

When fetching data again at this point

gridInstance?.getData()

It will be noticed that the customized _attributes are missing and a default _attributes will be displayed

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.