Skip to content

Commit 8c58c13

Browse files
committed
[MNY-250] Fix Save button not enabled after changing Royalty BPS in contract settings page (#8252)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a modification to the form handling in two components, adding the `shouldDirty` option to the `setValue` function calls for better form state management. ### Detailed summary - In `royalties.tsx`, added `shouldDirty: true` to `form.setValue` for `seller_fee_basis_points`. - In `platform-fees.tsx`, added `shouldDirty: true` to `form.setValue` for `platform_fee_basis_points`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Platform Fees and Royalties settings now mark field edits as dirty immediately, enabling the Save action when values are changed. * Unsaved-changes indicators and prompts update right away, reducing the risk of losing edits. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 2779afc commit 8c58c13

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export function SettingsPlatformFees({
137137
onChange={(value) =>
138138
form.setValue("platform_fee_basis_points", value, {
139139
shouldValidate: true,
140+
shouldDirty: true,
140141
})
141142
}
142143
value={form.watch("platform_fee_basis_points")}

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export function SettingsRoyalties({
151151
onChange={(value) =>
152152
form.setValue("seller_fee_basis_points", value, {
153153
shouldValidate: true,
154+
shouldDirty: true,
154155
})
155156
}
156157
value={form.watch("seller_fee_basis_points")}

0 commit comments

Comments
 (0)