rusackas opened a new pull request, #44858: URL: https://github.com/apache/superset/pull/44858
### SUMMARY Follow-up to #39257, closing out two real bugs that were flagged in review but deliberately deferred rather than rushed into that PR: - `CollectionTable.handleTableChange()` reset rows from the `collection` prop on both sorting and clearing a sort, instead of the component's own live state. An inline edit whose `onChange` hadn't round-tripped back into the parent's state yet (the normal case, since that round trip is async relative to the keystroke) got silently discarded the moment the user touched a sortable column header, in the dataset editor's Columns/Calculated Columns/Metrics tables. It now sorts and restores order from the live `collection`/`collectionArray` state, tracking the pre-sort row order in a ref so clearing a sort still restores the original order rather than whatever the prop happened to look like. - `TextAreaControl`'s Ace editor used an uncontrolled `defaultValue`, so a later `initialValue` prop change (e.g. clicking "Sync columns from source" mid-edit) never reached an already-mounted editor; the SQL expression editor just kept showing stale text. It now diffs incoming values against what the editor itself last emitted, and imperatively pushes a genuinely external change into the live Ace instance while preserving cursor position, without remounting the editor or fighting the user's own typing on every keystroke. The third thing flagged in that review (the dataset modal's resize handle not actually changing the nested Ant modal's `vw` width) was deliberately left out here, it's a pre-existing `Modal` component limitation rather than a regression, and not a data-loss bug like the two above. ### TESTING INSTRUCTIONS ```bash npx jest src/components/Datasource/components/CollectionTable/CollectionTable.test.tsx npx jest src/explore/components/controls/TextAreaControl.test.tsx ``` Manually: open a dataset's edit modal, go to Calculated Columns, sort by column name, edit an expression, then clear the sort — the edit now survives. Separately, open a column's SQL expression editor, click "Sync columns from source," and confirm the editor picks up the refreshed expression instead of showing the stale one. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
