UNPKG

@tanstack/table-core

Version:

Headless UI for building powerful tables & datagrids for TS/JS.

43 lines (39 loc) 1.4 kB
/** * table-core * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ 'use strict'; // const GlobalFaceting = { createTable: table => { table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__'); table.getGlobalFacetedRowModel = () => { if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) { return table.getPreFilteredRowModel(); } return table._getGlobalFacetedRowModel(); }; table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__'); table.getGlobalFacetedUniqueValues = () => { if (!table._getGlobalFacetedUniqueValues) { return new Map(); } return table._getGlobalFacetedUniqueValues(); }; table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__'); table.getGlobalFacetedMinMaxValues = () => { if (!table._getGlobalFacetedMinMaxValues) { return; } return table._getGlobalFacetedMinMaxValues(); }; } }; exports.GlobalFaceting = GlobalFaceting; //# sourceMappingURL=GlobalFaceting.js.map