File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -773,10 +773,8 @@ export type SetColumnDisplayFormatUpdaterAction = {
773
773
* @public
774
774
*/
775
775
export function setColumnDisplayFormat (
776
- dataId : string ,
777
- formats : {
778
- [ key : string ] : string ;
779
- }
776
+ dataId : SetColumnDisplayFormatUpdaterAction [ 'dataId' ] ,
777
+ formats : SetColumnDisplayFormatUpdaterAction [ 'formats' ]
780
778
) : Merge <
781
779
SetColumnDisplayFormatUpdaterAction ,
782
780
{ type : typeof ActionTypes . SET_COLUMN_DISPLAY_FORMAT }
Original file line number Diff line number Diff line change @@ -60,11 +60,11 @@ export type SavedLayer = {
60
60
columns : {
61
61
[ key : string ] : string ;
62
62
} ;
63
+ columnMode : string ;
63
64
isVisible : boolean ;
64
65
visConfig : Record < string , any > ;
65
66
hidden : boolean ;
66
67
textLabel : Merge < LayerTextLabel , { field : { name : string ; type : string } | null } > ;
67
- columnMode : string ;
68
68
} ;
69
69
visualChannels : SavedVisualChannels ;
70
70
} ;
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ function getScaleLabels(
206
206
} ) ;
207
207
}
208
208
209
- const customScaleLabelFormat = d => String ( d ) ;
209
+ const customScaleLabelFormat = n => ( n ? formatNumber ( n , 'real' ) : 'no value' ) ;
210
210
/**
211
211
* Get linear / quant scale color breaks
212
212
*/
Original file line number Diff line number Diff line change @@ -230,9 +230,10 @@ export function findById(id: string): <X extends {id: string}>(arr: X[]) => X |
230
230
* Returns array difference from
231
231
*/
232
232
export function arrayDifference < X extends { id : string } > ( source : X [ ] ) : ( compare : X [ ] ) => X [ ] {
233
+ const initial : X [ ] = [ ] ;
233
234
return compare =>
234
235
source . reduce ( ( acc , element ) => {
235
236
const foundElement = findById ( element . id ) ( compare ) ;
236
237
return foundElement ? [ ...acc , foundElement ] : acc ;
237
- } , [ ] as X [ ] ) ;
238
+ } , initial ) ;
238
239
}
You can’t perform that action at this time.
0 commit comments