@@ -49,7 +49,6 @@ import {
49
49
equals ,
50
50
filter ,
51
51
forEach ,
52
- forEachObjIndexed ,
53
52
keys ,
54
53
lensPath ,
55
54
set ,
@@ -191,15 +190,15 @@ export function recordUiEdit(layout, newProps) {
191
190
return ;
192
191
}
193
192
194
- forEachObjIndexed ( ( newPropVal , propName ) => {
193
+ forEach ( propName => {
195
194
// TODO: this only supports specifying top-level props to persist
196
195
// DO we need nested specification?
197
196
// This *does* support custom methods to save/restore these props,
198
197
// so if we persist `columns` on a table, the component can specify
199
198
// to only keep & restore the names, associating them with IDs.
200
199
// It just wouldn't allow us to separately enable/disable persisting
201
200
// something else inside columns.
202
- if ( persisted_props . indexOf ( propName ) !== - 1 ) {
201
+ if ( newProps [ propName ] ) {
203
202
const storage = stores [ persistence_type ] ;
204
203
const transform = getTransform ( element , propName ) ;
205
204
@@ -218,9 +217,9 @@ export function recordUiEdit(layout, newProps) {
218
217
) {
219
218
setOriginalAndId ( ) ;
220
219
}
221
- storage . setItem ( newValKey , transform . extract ( newPropVal ) ) ;
220
+ storage . setItem ( newValKey , transform . extract ( newProps [ propName ] ) ) ;
222
221
}
223
- } , newProps ) ;
222
+ } , persisted_props ) ;
224
223
}
225
224
226
225
function clearUIEdit ( id , persistence_type , propName ) {
0 commit comments