Allow negative values in tabular modifications#4073
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis change updates the NUMBER column editor in TabularForm to pass ChangesNumeric Editor Configuration
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/dialogs/network-modifications/tabular/tabular-form.tsx`:
- Line 477: The tabular form is passing allowNegativeValues through
cellEditorParams, but NumericEditor does not read that prop, so the setting is
currently a no-op. In tabular-form.tsx, update the logic around the
columnDef.cellEditorParams assignment for NumericEditor: if negatives are meant
to be allowed, remove the unused prop; if negatives must be blocked, implement
the actual validation/handling inside NumericEditor so it respects the
requirement instead of relying on cellEditorParams.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1f963934-ed96-456f-b8c2-f7c345a52237
📒 Files selected for processing (1)
src/components/dialogs/network-modifications/tabular/tabular-form.tsx
| case NUMBER: | ||
| columnDef.cellDataType = NUMBER; | ||
| columnDef.cellEditor = NumericEditor; | ||
| columnDef.cellEditorParams = { allowNegativeValues: true }; |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify NumericEditor cellEditorParams support in commons-ui and current package version
rg -n '"`@gridsuite/commons-ui`"' package.json
rg -nP -A5 'allowNegativeValues' --type=ts --type=tsxRepository: gridsuite/gridstudy-app
Length of output: 236
🏁 Script executed:
#!/bin/bash
# Check for allowNegativeValues usage in the codebase (fix file type syntax)
rg -n 'allowNegativeValues' --type js --type ts --type tsx 2>/dev/null || rg -n 'allowNegativeValues' -iRepository: gridsuite/gridstudy-app
Length of output: 161
🏁 Script executed:
#!/bin/bash
# Read the actual context around line 477 in tabular-form.tsx
sed -n '470,485p' src/components/dialogs/network-modifications/tabular/tabular-form.tsxRepository: gridsuite/gridstudy-app
Length of output: 996
🌐 Web query:
commons-ui 0.238.0 NumericEditor allowNegativeValues cellEditorParams release notes
💡 Result:
There is no evidence of a version 0.238.0 for the @gridsuite/commons-ui package as of July 2, 2026 [1][2]. The package history shows that versioning has progressed into the 0.22x range as of June 2026 [3][4][5]. Regarding the NumericEditor and the allowNegativeValues cellEditorParams, these appear to be standard configuration options associated with the underlying AG Grid library [6]. In AG Grid, the agNumberCellEditor is configured via cellEditorParams, which accepts properties like min and max to control the range of allowed numeric values [6]. While allowNegativeValues is not a standard, built-in property of the default INumberCellEditorParams interface provided by AG Grid [6], such functionality is typically implemented by setting the min parameter to a negative number (e.g., min: -Infinity or a specific negative limit) [6]. If you are encountering issues with numeric editing in your specific implementation, it is recommended to: 1. Verify the installed version of @gridsuite/commons-ui in your package.json [3][5]. 2. Check the library's custom components (often found under directories like src/components/composite/customAGGrid) to see if they expose custom props or wrappers that deviate from standard AG Grid behavior [7]. 3. Ensure that your configuration of cellEditorParams adheres to the expected AG Grid INumberCellEditorParams structure [6].
Citations:
- 1: https://registry.npmjs.org/@gridsuite/commons-ui
- 2: https://registry.npmjs.org/%40gridsuite%2Fcommons-ui
- 3: gridsuite/commons-ui@a98f387
- 4: gridsuite/commons-ui@62715f4
- 5: gridsuite/commons-ui@35f8b81
- 6: https://www.ag-grid.com/javascript-data-grid/provided-cell-editors-number/
- 7: Migrate report viewer to commons ui commons-ui#1206
🏁 Script executed:
#!/bin/bash
# Check for commons-ui releases and versions around 0.238
curl -s https://api.github.com/repos/gridsuite/commons-ui/releases | \
jq -r '.[] | "\(.tag_name): \(.published_at)"' | head -20Repository: gridsuite/gridstudy-app
Length of output: 781
🏁 Script executed:
#!/bin/bash
# Search for NumericEditor and allowNegativeValues in commons-ui repo
curl -s https://api.github.com/repos/gridsuite/commons-ui/contents/src | jq -r '.[] | select(.name | test("NumericEditor|numeric"; "i")) | .name'Repository: gridsuite/gridstudy-app
Length of output: 161
🌐 Web query:
gridsuite commons-ui PR #1220 NumericEditor allowNegativeValues
💡 Result:
There is no evidence in the provided search results of a pull request #1220 within the gridsuite/commons-ui repository, nor is there documentation confirming the existence of a specific NumericEditor component with an allowNegativeValues property within that library. The search results confirm that the gridsuite/commons-ui library is a collection of shared React components for GridSuite applications [1][2][3]. While the library contains features related to network modifications and parameter forms [4][5][6][7], existing documentation and pull request history do not reference a #1220 related to numeric editing. Other numeric editor implementations found in the search results (such as those from Telerik or Ag-Grid) are external to this specific repository [8][9][10]. Users looking for component-specific functionality in gridsuite/commons-ui should verify the repository's source code or open issues directly on the official GitHub project [1].
Citations:
- 1: https://github.com/gridsuite/commons-ui
- 2: https://registry.npmjs.org/%40gridsuite%2Fcommons-ui
- 3: https://registry.npmjs.org/@gridsuite/commons-ui
- 4: Parameters new design commons-ui#1197
- 5: chore(LineCreation): move form from grid-study commons-ui#1213
- 6: chore(GeneratorModification): move form to commons UI commons-ui#1173
- 7: chore(GeneratorCreation): move form to commons UI commons-ui#1167
- 8: https://github.com/ag-grid/ag-grid/blob/dd459819/packages/ag-grid-community/src/edit/cellEditors/numberCellEditor.ts
- 9: https://www.telerik.com/forums/numeric-editor-to-allow-only-positive-numbers-in-kendo-react-grid
- 10: https://www.ag-grid.com/angular-data-grid/provided-cell-editors-number/
🌐 Web query:
@gridsuite/commons-ui latest versions npm registry 0.23
💡 Result:
As of July 2, 2026, the latest version of @gridsuite/commons-ui available on the npm registry is 0.238.0 [1]. While earlier npm registry entries showed older versions in the 0.18x range [2][3], current security and package data confirm that version 0.238.0 is the most recent release [1]. Information regarding a 0.23 version specifically appears to refer to an older release cycle or a misunderstanding of the versioning format, as the package has progressed significantly beyond that point [1].
Citations:
- 1: https://security.snyk.io/package/npm/%40gridsuite%2Fcommons-ui/0.238.0
- 2: https://www.npmjs.com/package/@gridsuite/commons-ui
- 3: https://registry.npmjs.org/%40gridsuite%2Fcommons-ui
🏁 Script executed:
#!/bin/bash
# Get the source directory structure of commons-ui
curl -s https://api.github.com/repos/gridsuite/commons-ui/git/trees/main?recursive=1 | \
jq -r '.tree[] | select(.path | test("[Nn]umeric|[Ee]ditor"; "i")) | .path' | head -20Repository: gridsuite/gridstudy-app
Length of output: 1467
🏁 Script executed:
#!/bin/bash
# Look for NumericEditor component in commons-ui
curl -s https://api.github.com/repos/gridsuite/commons-ui/git/trees/main?recursive=1 | \
jq -r '.tree[] | select(.path | test("NumericEditor|numeric-editor"; "i")) | .path'Repository: gridsuite/gridstudy-app
Length of output: 228
🌐 Web query:
gridsuite commons-ui v0.238.0 release notes changelog features
💡 Result:
There is no publicly available information or release notes regarding a version 0.238.0 of the @gridsuite/commons-ui library as of July 2, 2026. Publicly available records indicate that the library is actively maintained and versioned, with versions such as 0.223.0 [1][2][3] and 0.233.0 [4] appearing in recent development activity as of June 2026. The @gridsuite/commons-ui library, which serves as a collection of shared React components for GridSuite applications, does not maintain a public-facing changelog or dedicated release notes page in its official repository [5][6]. Version updates are typically managed through the repository's commit history and package registry metadata [7][8].
Citations:
- 1: gridsuite/commons-ui@35f8b81
- 2: gridsuite/commons-ui@62715f4
- 3: gridsuite/commons-ui@a98f387
- 4: Bump @gridsuite/commons-ui to 0.233.0 gridexplore-app#900
- 5: https://github.com/gridsuite/commons-ui
- 6: https://github.com/gridsuite/commons-ui/blob/main/README.md
- 7: https://registry.npmjs.org/%40gridsuite%2Fcommons-ui
- 8: https://registry.npmjs.org/@gridsuite/commons-ui
🏁 Script executed:
#!/bin/bash
# Fetch the NumericEditor source from commons-ui
curl -s https://raw.githubusercontent.com/gridsuite/commons-ui/main/src/components/composite/agGridTable/cellEditors/numericEditor.tsxRepository: gridsuite/gridstudy-app
Length of output: 4591
Line 477 sets allowNegativeValues in cellEditorParams, but this property is not implemented in commons-ui 0.238.0's NumericEditor.
The NumericEditor component does not accept or process any properties from cellEditorParams—it only uses value, onValueChange, and eventKey from AG Grid's CustomCellEditorProps. The referenced commons-ui PR #1220 does not exist in the commons-ui repository. The allowNegativeValues prop will be silently ignored at runtime.
However, the NumericEditor already implicitly allows negative input (the minus sign is not blocked by the validation regex), so the intended behavior (permitting negative values) is already active. If the intent is to prevent negative values instead, the current code will not achieve that goal—the editor will still accept them.
Clarify the requirement: if negative values should be allowed, remove the unused allowNegativeValues prop; if they should be blocked, implement actual validation logic in the NumericEditor component.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/dialogs/network-modifications/tabular/tabular-form.tsx` at
line 477, The tabular form is passing allowNegativeValues through
cellEditorParams, but NumericEditor does not read that prop, so the setting is
currently a no-op. In tabular-form.tsx, update the logic around the
columnDef.cellEditorParams assignment for NumericEditor: if negatives are meant
to be allowed, remove the unused prop; if negatives must be blocked, implement
the actual validation/handling inside NumericEditor so it respects the
requirement instead of relying on cellEditorParams.
|



Summary
Depends on gridsuite/commons-ui#1220