-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cannot edit after sort #2001
Conversation
data.rawData.forEach((rawRow, index) => { | ||
const { rowKey } = rawRow; | ||
|
||
if (isObservable(rawRow) || rowKeysInViewport.includes(rowKey)) { | ||
makeObservable({ | ||
store, | ||
rowIndex: index, | ||
silent: false, | ||
lazyObservable: false, | ||
forced: true, | ||
}); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rawRow가 반응형 데이터 일 때 대응하는 viewRow가 올바른 속성을 갖도록 하기 위해 이와 같이 수정했습니다.
정렬 후 기존에 반응형 데이터였던 데이터와 새롭게 뷰포트에 나타나는 데이터는 반응형 데이터야 합니다.
const { data, column, id } = store; | ||
const { rawData, viewData } = data; | ||
const { treeColumnName } = column; | ||
const rawRow = rawData[rowIndex]; | ||
|
||
if (isObservable(rawRow)) { | ||
if (!forced && isObservable(rawRow)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에 반응형 데이터 였던 row를 다시 반응형 데이터로 만들기 위해 forced
인자를 추가했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변경사항 자체는 간단해보이는데 파급력이 커보이니 가능하면 예제 하나씩 화면에서 수동 테스트 해보시는건 어떨까요?
넵 복합 기능 직접 하나씩 테스트해봤습니다! ㅎㅎㅎ |
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
Fixed an issue where editing could not be performed after sorting.
In the previous fix, i unobserved all data after sorting. However, i found additional issues where the next behavior did not work as intended (changing the data in the viewport to observable data).
Therefore, we discarded the previous fix and proceeded with a fix that proactively changes the rows that were previously observable data and the rows that are included in the viewport after sorting to observable data.
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨