File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
2+ ## [ 32.6.0] - 2026-04-27
3+ - Add optional editStatus parameter to SaveBackCancelButtons. Set it to edit or create as appropriate to allow cancel while save is disabled.
24## [ 32.5.2] - 2026-04-22
35- Allow AddressUtility button to use full width of component
46## [ 32.5.1] - 2026-04-22
Original file line number Diff line number Diff line change 11{
22 "name" : " @linn-it/linn-form-components-library" ,
3- "version" : " 32.5.2 " ,
3+ "version" : " 32.6.0 " ,
44 "private" : false ,
55 "repository" : {
66 "type" : " git" ,
Original file line number Diff line number Diff line change @@ -8,10 +8,13 @@ function SaveBackCancelButtons({
88 cancelClick,
99 saveDisabled = false ,
1010 backClick,
11- showBackButton = true
11+ showBackButton = true ,
12+ editStatus = null
1213} ) {
14+ const editing = editStatus === 'edit' || editStatus === 'create' ;
15+
1316 const handleClick = ( ) => {
14- if ( saveDisabled ) {
17+ if ( saveDisabled && ! editing ) {
1518 backClick ( ) ;
1619 } else {
1720 cancelClick ( ) ;
@@ -20,14 +23,14 @@ function SaveBackCancelButtons({
2023
2124 return (
2225 < Box sx = { { float : 'right' } } >
23- { ( ! saveDisabled || showBackButton ) && (
26+ { ( ! saveDisabled || showBackButton || editing ) && (
2427 < Button
2528 id = "cancel-button"
2629 onClick = { ( ) => handleClick ( ) }
2730 variant = "outlined"
2831 sx = { { marginRight : theme => theme . spacing ( 1 ) } }
2932 >
30- { saveDisabled ? 'Back' : 'Cancel' }
33+ { saveDisabled && ! editing ? 'Back' : 'Cancel' }
3134 </ Button >
3235 ) }
3336 < Button
You can’t perform that action at this time.
0 commit comments