mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fix some bugs with repositioning rows.
Summary: - Fixed an issue with manualSort values being very close floats. It is already handled by the data engine, but the client was being unnecessarily proactive and introduced a bug. - The fix also helps with rearranging rows in filtered situations: they will now stay next to the row before which they were inserted. - The fix accidentally improves (though doesn't fully fix) the issue where new columns show up in unexpected places in the raw-data column list. - Fixed another rare bug with row order not getting updated correctly when positions update. Test Plan: Added test cases for the improved behavior; fixed affected tests. Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3462
This commit is contained in:
@@ -401,7 +401,7 @@ export class VisibleFieldsConfig extends Disposable {
|
||||
}
|
||||
|
||||
function getFieldNewPosition(fields: KoArray<ViewFieldRec>, item: IField,
|
||||
nextField: ViewFieldRec|null): number {
|
||||
nextField: ViewFieldRec|null): number|null {
|
||||
const index = getItemIndex(fields, nextField);
|
||||
return tableUtil.fieldInsertPositions(fields, index, 1)[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user