mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	formatting
This commit is contained in:
		
							parent
							
								
									f44bc9a849
								
							
						
					
					
						commit
						9536a1b78f
					
				@ -9,7 +9,7 @@ import {
 | 
				
			|||||||
    TableRow,
 | 
					    TableRow,
 | 
				
			||||||
    TableSearch,
 | 
					    TableSearch,
 | 
				
			||||||
} from 'component/common/Table';
 | 
					} from 'component/common/Table';
 | 
				
			||||||
import {SortingRule, useFlexLayout, useSortBy, useTable} from 'react-table';
 | 
					import { SortingRule, useFlexLayout, useSortBy, useTable } from 'react-table';
 | 
				
			||||||
import { SearchHighlightProvider } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
 | 
					import { SearchHighlightProvider } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
 | 
				
			||||||
import { useMediaQuery } from '@mui/material';
 | 
					import { useMediaQuery } from '@mui/material';
 | 
				
			||||||
import { sortTypes } from 'utils/sortTypes';
 | 
					import { sortTypes } from 'utils/sortTypes';
 | 
				
			||||||
@ -40,9 +40,18 @@ export interface IFeaturesArchiveTableProps {
 | 
				
			|||||||
    refetch: () => void;
 | 
					    refetch: () => void;
 | 
				
			||||||
    loading: boolean;
 | 
					    loading: boolean;
 | 
				
			||||||
    storedParams: SortingRule<string>;
 | 
					    storedParams: SortingRule<string>;
 | 
				
			||||||
    setStoredParams:  (newValue: (SortingRule<string> | ((prev: SortingRule<string>) => SortingRule<string>))) => SortingRule<string>;
 | 
					    setStoredParams: (
 | 
				
			||||||
 | 
					        newValue:
 | 
				
			||||||
 | 
					            | SortingRule<string>
 | 
				
			||||||
 | 
					            | ((prev: SortingRule<string>) => SortingRule<string>)
 | 
				
			||||||
 | 
					    ) => SortingRule<string>;
 | 
				
			||||||
    searchParams: URLSearchParams;
 | 
					    searchParams: URLSearchParams;
 | 
				
			||||||
    setSearchParams:  (nextInit: URLSearchParamsInit, navigateOptions?: ({replace?: boolean | undefined, state?: any} | undefined)) => void;
 | 
					    setSearchParams: (
 | 
				
			||||||
 | 
					        nextInit: URLSearchParamsInit,
 | 
				
			||||||
 | 
					        navigateOptions?:
 | 
				
			||||||
 | 
					            | { replace?: boolean | undefined; state?: any }
 | 
				
			||||||
 | 
					            | undefined
 | 
				
			||||||
 | 
					    ) => void;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const ArchiveTable = ({
 | 
					export const ArchiveTable = ({
 | 
				
			||||||
@ -283,7 +292,8 @@ export const ArchiveTable = ({
 | 
				
			|||||||
                                <TableBody {...getTableBodyProps()}>
 | 
					                                <TableBody {...getTableBodyProps()}>
 | 
				
			||||||
                                    {rows.map((row, index) => {
 | 
					                                    {rows.map((row, index) => {
 | 
				
			||||||
                                        const isVirtual =
 | 
					                                        const isVirtual =
 | 
				
			||||||
                                            index < firstRenderedIndex || index > lastRenderedIndex;
 | 
					                                            index < firstRenderedIndex ||
 | 
				
			||||||
 | 
					                                            index > lastRenderedIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        if (isVirtual) {
 | 
					                                        if (isVirtual) {
 | 
				
			||||||
                                            return null;
 | 
					                                            return null;
 | 
				
			||||||
@ -291,12 +301,17 @@ export const ArchiveTable = ({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                                        prepareRow(row);
 | 
					                                        prepareRow(row);
 | 
				
			||||||
                                        return (
 | 
					                                        return (
 | 
				
			||||||
                                            <TableRow hover {...row.getRowProps()}>
 | 
					                                            <TableRow
 | 
				
			||||||
 | 
					                                                hover
 | 
				
			||||||
 | 
					                                                {...row.getRowProps()}
 | 
				
			||||||
 | 
					                                            >
 | 
				
			||||||
                                                {row.cells.map(cell => (
 | 
					                                                {row.cells.map(cell => (
 | 
				
			||||||
                                                    <TableCell
 | 
					                                                    <TableCell
 | 
				
			||||||
                                                        {...cell.getCellProps({
 | 
					                                                        {...cell.getCellProps({
 | 
				
			||||||
                                                            style: {
 | 
					                                                            style: {
 | 
				
			||||||
                                                                flex: cell.column.minWidth
 | 
					                                                                flex: cell
 | 
				
			||||||
 | 
					                                                                    .column
 | 
				
			||||||
 | 
					                                                                    .minWidth
 | 
				
			||||||
                                                                    ? '1 0 auto'
 | 
					                                                                    ? '1 0 auto'
 | 
				
			||||||
                                                                    : undefined,
 | 
					                                                                    : undefined,
 | 
				
			||||||
                                                            },
 | 
					                                                            },
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ export const FeaturesArchiveTable = () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
        <ArchiveTable
 | 
					        <ArchiveTable
 | 
				
			||||||
            title='Archived'
 | 
					            title="Archived"
 | 
				
			||||||
            archivedFeatures={archivedFeatures}
 | 
					            archivedFeatures={archivedFeatures}
 | 
				
			||||||
            loading={loading}
 | 
					            loading={loading}
 | 
				
			||||||
            searchParams={searchParams}
 | 
					            searchParams={searchParams}
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,7 @@ export const ProjectFeaturesArchiveTable = ({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
        <ArchiveTable
 | 
					        <ArchiveTable
 | 
				
			||||||
            title='Project Features Archive'
 | 
					            title="Project Features Archive"
 | 
				
			||||||
            archivedFeatures={archivedFeatures}
 | 
					            archivedFeatures={archivedFeatures}
 | 
				
			||||||
            loading={loading}
 | 
					            loading={loading}
 | 
				
			||||||
            searchParams={searchParams}
 | 
					            searchParams={searchParams}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user