You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
My claudes have been trying to wrtite their own autocompletes for ages and I grudgingly ask them to use our 'Search' instead... so I'll let them know this exists now!
Mark MUI grid events as handled after custom traversal
src/hooks/useEditableSearchGrid.js:160
preventDefault() only suppresses the browser action; MUI's grid event handlers use defaultMuiPrevented. Without setting it here, the grid's own Tab handler can run after this custom commit/traversal and override focus or process the edit twice. Mark the MUI event handled, as the Enter branch already does.
Invoke lookup callback only when a search field changes
src/hooks/useEditableSearchGrid.js:209
This callback also fires when an editable non-search column is committed, with changedField undefined. That contradicts the documented search-cell-only contract and can unexpectedly trigger consumer lookup/validation logic; invoke it only when a search field actually changed.
Preserve existing result IDs during lookup normalization
src/hooks/useEditableSearchGrid.js:259
This normalization overwrites a result's existing id whenever the lookup code comes from another field. Consequently, an updateFields entry with from: 'id' copies the lookup code rather than the result's original ID, despite the API promising to copy result[from]. Preserve an existing id and update writeResultToRow to fall back through column.field before id.
This test types the option label, so it never exercises the new idField matching branch that lets users type a code and commit on blur/Tab. Type the code here to cover that advertised behavior; object mode already covers label matching.
Import useState in the standalone usage example
src/hooks/useEditableSearchGrid.mdx:36
The standalone usage example calls useState but does not import it, so copying the documented example fails to compile.
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Keyboard navigation ignores active pagination page
src/hooks/useEditableSearchGrid.js:147
This selector includes every filtered/sorted row, not just rows on the active client-side pagination page. At the last cell of a page, Tab therefore targets the first row of the next (unrendered) page, so focus is lost instead of leaving/wrapping within the displayed page. Derive the IDs from gridVisibleRowsSelector, which accounts for pagination when enabled and returns all rows otherwise.
Usage example omits the useState import
src/hooks/useEditableSearchGrid.mdx:35
The usage example calls useState but does not import it, so the documented copy-and-paste example fails with useState is not defined. Add the React hook import to the snippet.
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Limit keyboard navigation to rows on the active pagination page
src/hooks/useEditableSearchGrid.js:146
This selector includes every filtered/sorted row, not just rows on the active pagination page. On the last cell of a page, the handler therefore prevents the browser's Tab behavior and tries to focus a row rendered on another page; Shift-Tab has the same problem at a page boundary. Base traversal on the current page's rendered row IDs (for example, MUI's paginated-visible-row selector), and allow default Tab behavior at that page's boundaries.
Document onRowChange behavior for non-search field edits
src/hooks/useEditableSearchGrid.mdx:105
This contract does not match the implementation: processRowUpdate calls onRowChange for every editable column, including the example's amount, with changedField undefined for non-search edits. Document that behavior so consumers do not accidentally run lookup or persistence logic on unrelated edits.
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.