File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -39,3 +39,18 @@ export function queryToSearchString(query: RawQuery | URLSearchParamsInit = {})
3939
4040 return queryString ? `?${ queryString } ` : undefined ;
4141}
42+
43+ export function filterQueryToSearchString (
44+ query : RawQuery | URLSearchParamsInit ,
45+ filter : string [ ] | ( ( key : string ) => boolean ) ,
46+ ) {
47+ const searchParams = createSearchParams ( query ) ;
48+ const filteredParams = Array . from ( searchParams . entries ( ) ) . filter ( ( [ key ] ) => {
49+ if ( Array . isArray ( filter ) ) {
50+ return filter . includes ( key ) ;
51+ }
52+ return filter ( key ) ;
53+ } ) ;
54+
55+ return queryToSearchString ( filteredParams ) ;
56+ }
Original file line number Diff line number Diff line change @@ -748,7 +748,6 @@ export const componentMap = {
748748 CopyIcon : 'Icons' ,
749749 OrganizationUrlInput : 'TextInput' ,
750750 Footer : '' ,
751- PageBoxFullHeight : '' ,
752751 MultiSelect : '' ,
753752 DeleteBranchModal : 'ModalAlert' ,
754753 SecurityStandardIssueCount : 'Excluded' ,
You can’t perform that action at this time.
0 commit comments