@cloudscape-design/collection-hooks
Advanced tools
Comparing version
@@ -5,9 +5,12 @@ /** | ||
*/ | ||
declare const process: { | ||
env: { | ||
NODE_ENV?: string; | ||
declare global { | ||
const process: { | ||
env: { | ||
NODE_ENV?: string; | ||
}; | ||
}; | ||
}; | ||
declare const console: { | ||
warn: (...args: Array<any>) => void; | ||
}; | ||
const console: { | ||
warn: (...args: Array<any>) => void; | ||
}; | ||
} | ||
export {}; |
"use strict"; | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -37,12 +37,15 @@ "use strict"; | ||
setFiltering(filteringText) { | ||
var _a; | ||
dispatch({ type: 'filtering', filteringText }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
setSorting(state) { | ||
var _a; | ||
dispatch({ type: 'sorting', sortingState: state }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
setCurrentPage(pageIndex) { | ||
var _a; | ||
dispatch({ type: 'pagination', pageIndex }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
@@ -53,4 +56,5 @@ setSelectedItems(selectedItems) { | ||
setPropertyFiltering(query) { | ||
var _a; | ||
dispatch({ type: 'property-filtering', query }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
@@ -57,0 +61,0 @@ setExpandedItems(expandedItems) { |
{ | ||
"commit": "f813f87fe01a328ba540a6f9168457d77339d49c" | ||
"commit": "60a26d1f95d7fd2e06e285bfa4230e328c3dcade" | ||
} |
@@ -5,9 +5,12 @@ /** | ||
*/ | ||
declare const process: { | ||
env: { | ||
NODE_ENV?: string; | ||
declare global { | ||
const process: { | ||
env: { | ||
NODE_ENV?: string; | ||
}; | ||
}; | ||
}; | ||
declare const console: { | ||
warn: (...args: Array<any>) => void; | ||
}; | ||
const console: { | ||
warn: (...args: Array<any>) => void; | ||
}; | ||
} | ||
export {}; |
@@ -1,3 +0,3 @@ | ||
"use strict"; | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
export {}; |
@@ -32,12 +32,15 @@ import { fixupFalsyValues } from './operations/property-filter.js'; | ||
setFiltering(filteringText) { | ||
var _a; | ||
dispatch({ type: 'filtering', filteringText }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
setSorting(state) { | ||
var _a; | ||
dispatch({ type: 'sorting', sortingState: state }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
setCurrentPage(pageIndex) { | ||
var _a; | ||
dispatch({ type: 'pagination', pageIndex }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
@@ -48,4 +51,5 @@ setSelectedItems(selectedItems) { | ||
setPropertyFiltering(query) { | ||
var _a; | ||
dispatch({ type: 'property-filtering', query }); | ||
collectionRef.current && collectionRef.current.scrollToTop(); | ||
(_a = collectionRef.current) === null || _a === void 0 ? void 0 : _a.scrollToTop(); | ||
}, | ||
@@ -52,0 +56,0 @@ setExpandedItems(expandedItems) { |
{ | ||
"name": "@cloudscape-design/collection-hooks", | ||
"version": "1.0.65", | ||
"version": "1.0.66", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "repository": { |
106283
0.46%2118
0.71%