File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
libs/observable-api/states
packages/block/block-list/property-editors/block-list-editor Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ export class UmbArrayState<T> extends UmbDeepState<T[]> {
35
35
*/
36
36
sortBy ( sortMethod ?: ( a : T , b : T ) => number ) {
37
37
this . #sortMethod = sortMethod ;
38
- super . setValue ( this . getValue ( ) . sort ( this . #sortMethod) ) ;
38
+ const value = this . getValue ( ) ;
39
+ if ( value ) {
40
+ super . setValue ( [ ...value ] . sort ( this . #sortMethod) ) ;
41
+ }
39
42
return this ;
40
43
}
41
44
@@ -51,7 +54,7 @@ export class UmbArrayState<T> extends UmbDeepState<T[]> {
51
54
*/
52
55
override setValue ( value : T [ ] ) {
53
56
if ( this . #sortMethod) {
54
- super . setValue ( value . sort ( this . #sortMethod) ) ;
57
+ super . setValue ( [ ... value ] . sort ( this . #sortMethod) ) ;
55
58
} else {
56
59
super . setValue ( value ) ;
57
60
}
Original file line number Diff line number Diff line change 1
- import { manifest as blockListSchemaManifest } from './Umbraco.BlockList.js' ;
2
1
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry' ;
2
+ import { manifest as blockListSchemaManifest } from './Umbraco.BlockList.js' ;
3
3
4
4
export const UMB_BLOCK_LIST_PROPERTY_EDITOR_ALIAS = 'Umbraco.BlockList' ;
5
5
You can’t perform that action at this time.
0 commit comments