File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 55 * subset of node.js types, safe to use in browser and bundlers
66 * we do not use `lib.dom` types because they are not available in SSR environment
77 */
8- declare const process : { env : { NODE_ENV ?: string } } ;
9- declare const console : { warn : ( ...args : Array < any > ) => void } ;
8+ declare global {
9+ const process : { env : { NODE_ENV ?: string } } ;
10+ const console : { warn : ( ...args : Array < any > ) => void } ;
11+ }
12+
13+ // dummy export to make typescript treat this file as ES module
14+ export { } ;
Original file line number Diff line number Diff line change @@ -84,22 +84,22 @@ export function createActions<T>({
8484 return {
8585 setFiltering ( filteringText ) {
8686 dispatch ( { type : 'filtering' , filteringText } ) ;
87- collectionRef . current && collectionRef . current . scrollToTop ( ) ;
87+ collectionRef . current ? .scrollToTop ( ) ;
8888 } ,
8989 setSorting ( state : SortingState < T > ) {
9090 dispatch ( { type : 'sorting' , sortingState : state } ) ;
91- collectionRef . current && collectionRef . current . scrollToTop ( ) ;
91+ collectionRef . current ? .scrollToTop ( ) ;
9292 } ,
9393 setCurrentPage ( pageIndex : number ) {
9494 dispatch ( { type : 'pagination' , pageIndex } ) ;
95- collectionRef . current && collectionRef . current . scrollToTop ( ) ;
95+ collectionRef . current ? .scrollToTop ( ) ;
9696 } ,
9797 setSelectedItems ( selectedItems : Array < T > ) {
9898 dispatch ( { type : 'selection' , selectedItems } ) ;
9999 } ,
100100 setPropertyFiltering ( query : PropertyFilterQuery ) {
101101 dispatch ( { type : 'property-filtering' , query } ) ;
102- collectionRef . current && collectionRef . current . scrollToTop ( ) ;
102+ collectionRef . current ? .scrollToTop ( ) ;
103103 } ,
104104 setExpandedItems ( expandedItems : ReadonlyArray < T > ) {
105105 dispatch ( { type : 'expansion' , expandedItems } ) ;
You can’t perform that action at this time.
0 commit comments