File tree Expand file tree Collapse file tree
packages/pluggableWidgets/datagrid-web/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ export class DatasourceParamsController implements ReactiveController {
140140 return `${ widgetName } :[${ hash } ]` ;
141141 }
142142
143- static restoreMeta ( filter : FilterCondition ) : FiltersMeta | null {
143+ static restoreMeta ( filter : FilterCondition , widgetName : string ) : FiltersMeta | null {
144144 const hash = this . filterHash ( filter ) ;
145- const key = this . storageKey ( "dataKey" , hash ) ;
145+ const key = this . storageKey ( widgetName , hash ) ;
146146 const metaJson = sessionStorage . getItem ( key ) ;
147147 if ( ! metaJson ) {
148148 return null ;
@@ -151,13 +151,13 @@ export class DatasourceParamsController implements ReactiveController {
151151 }
152152
153153 static unzipFilter (
154- filter ? : FilterCondition ,
155- widgetName = "DatasourceParamsController"
154+ filter : FilterCondition | undefined ,
155+ widgetName : string
156156 ) : [ columnFilters : Array < FilterCondition | undefined > , customFilters : Array < FilterCondition | undefined > ] {
157157 if ( ! filter ) {
158158 return [ [ ] , [ ] ] ;
159159 }
160- const meta = this . restoreMeta ( filter ) ;
160+ const meta = this . restoreMeta ( filter , widgetName ) ;
161161 if ( ! meta ) {
162162 return [ [ ] , [ ] ] ;
163163 }
Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ export class RootGridStore extends BaseControllerHost {
3838 super ( ) ;
3939
4040 const { props } = gate ;
41- const [ columnsInitFilter , sharedInitFilter ] = DatasourceParamsController . unzipFilter ( props . datasource . filter ) ;
41+ const [ columnsInitFilter , sharedInitFilter ] = DatasourceParamsController . unzipFilter (
42+ props . datasource . filter ,
43+ props . name
44+ ) ;
4245
4346 this . gate = gate ;
4447 this . staticInfo = {
You can’t perform that action at this time.
0 commit comments