react#useDeferredValue TypeScript Examples
The following examples show how to use
react#useDeferredValue.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CharacterSelectionModal.tsx From genshin-optimizer with MIT License | 5 votes |
export function CharacterSelectionModal({ show, onHide, onSelect, filter = () => true, newFirst = false }: CharacterSelectionModalProps) {
const sortKeys = useMemo(() => newFirst ? ["new", ...defaultSortKeys] : defaultSortKeys, [newFirst])
const { database } = useContext(DatabaseContext)
const { t } = useTranslation("page_character")
const [sortBy, setsortBy] = useState(sortKeys[0])
const [ascending, setascending] = useState(false)
const [elementalFilter, setelementalFilter] = useState<ElementKey | "">("")
const [weaponFilter, setweaponFilter] = useState<WeaponTypeKey | "">("")
const characterSheets = usePromise(CharacterSheet.getAll, [])
const [favesDirty, setFavesDirty] = useForceUpdate()
useEffect(() => database.followAnyChar(setFavesDirty), [database, setFavesDirty])
const [searchTerm, setSearchTerm] = useState("")
const deferredSearchTerm = useDeferredValue(searchTerm)
const sortConfigs = useMemo(() => characterSheets && characterSortConfigs(database, characterSheets), [database, characterSheets])
const filterConfigs = useMemo(() => characterSheets && favesDirty && characterFilterConfigs(database, characterSheets), [favesDirty, database, characterSheets])
const ownedCharacterKeyList = useMemo(() => characterSheets ? allCharacterKeys.filter(cKey => filter(database._getChar(cKey), characterSheets[cKey])) : [], [database, characterSheets, filter])
const characterKeyList = useMemo(() => (characterSheets && sortConfigs && filterConfigs) ?
ownedCharacterKeyList
.filter(filterFunction({ element: elementalFilter, weaponType: weaponFilter, favorite: "yes", name: deferredSearchTerm }, filterConfigs))
.sort(sortFunction(sortBy, ascending, sortConfigs) as (a: CharacterKey, b: CharacterKey) => number)
.concat(
ownedCharacterKeyList
.filter(filterFunction({ element: elementalFilter, weaponType: weaponFilter, favorite: "no", name: deferredSearchTerm }, filterConfigs))
.sort(sortFunction(sortBy, ascending, sortConfigs) as (a: CharacterKey, b: CharacterKey) => number)
)
: [],
[characterSheets, elementalFilter, weaponFilter, sortBy, ascending, sortConfigs, filterConfigs, ownedCharacterKeyList, deferredSearchTerm])
if (!characterSheets) return null
return <ModalWrapper open={show} onClose={onHide} sx={{ "& .MuiContainer-root": { justifyContent: "normal" } }}>
<CardDark>
<CardContent sx={{ py: 1 }}>
<Grid container spacing={1} >
<Grid item>
<WeaponToggle sx={{ height: "100%" }} onChange={setweaponFilter} value={weaponFilter} size="small" />
</Grid>
<Grid item>
<ElementToggle sx={{ height: "100%" }} onChange={setelementalFilter} value={elementalFilter} size="small" />
</Grid>
<Grid item>
<TextField
autoFocus
value={searchTerm}
onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setSearchTerm(e.target.value)}
label={t("characterName")}
/>
</Grid>
<Grid item flexGrow={1} />
<Grid item >
<SortByButton sx={{ height: "100%" }}
sortKeys={sortKeys} value={sortBy} onChange={setsortBy as any}
ascending={ascending} onChangeAsc={setascending} />
</Grid>
<Grid item>
<CloseButton onClick={onHide} />
</Grid>
</Grid>
</CardContent>
<Divider />
<CardContent><Grid container spacing={1}>
{characterKeyList.map(characterKey => <Grid item key={characterKey} xs={6} md={4} lg={3} >
<CharacterBtn key={characterKey} characterKey={characterKey} characterSheet={characterSheets[characterKey]} onClick={() => { onHide(); onSelect?.(characterKey) }} />
</Grid>)}
</Grid></CardContent>
</CardDark>
</ModalWrapper>
}
Example #2
Source File: index.tsx From genshin-optimizer with MIT License | 4 votes |
export default function PageCharacter(props) {
// TODO: #412 We shouldn't be loading all the character translation files. Should have a separate lookup file for character name.
const { t } = useTranslation(["page_character", ...allCharacterKeys.map(k => `char_${k}_gen`)])
const { database } = useContext(DatabaseContext)
const [state, stateDispatch] = useDBState("CharacterDisplay", initialState)
const [searchTerm, setSearchTerm] = useState("")
const deferredSearchTerm = useDeferredValue(searchTerm)
const [pageIdex, setpageIdex] = useState(0)
const invScrollRef = useRef<HTMLDivElement>(null)
const setPage = useCallback(
(e, value) => {
invScrollRef.current?.scrollIntoView({ behavior: "smooth" })
setpageIdex(value - 1);
},
[setpageIdex, invScrollRef],
)
const brPt = useMediaQueryUp()
const maxNumToDisplay = numToShowMap[brPt]
const [newCharacter, setnewCharacter] = useState(false)
const [dbDirty, forceUpdate] = useForceUpdate()
//set follow, should run only once
useEffect(() => {
ReactGA.send({ hitType: "pageview", page: '/characters' })
return database.followAnyChar(forceUpdate)
}, [forceUpdate, database])
const characterSheets = usePromise(CharacterSheet.getAll, [])
const deleteCharacter = useCallback(async (cKey: CharacterKey) => {
const chararcterSheet = await CharacterSheet.get(cKey)
let name = chararcterSheet?.name
//use translated string
if (typeof name === "object")
name = i18next.t(`char_${cKey}_gen:name`)
if (!window.confirm(t("removeCharacter", { value: name }))) return
database.removeChar(cKey)
}, [database, t])
const editCharacter = useCharSelectionCallback()
const navigate = useNavigate()
const { element, weaponType } = state
const sortConfigs = useMemo(() => characterSheets && characterSortConfigs(database, characterSheets), [database, characterSheets])
const filterConfigs = useMemo(() => characterSheets && characterFilterConfigs(database, characterSheets), [database, characterSheets])
const { charKeyList, totalCharNum } = useMemo(() => {
const chars = database._getCharKeys()
const totalCharNum = chars.length
if (!sortConfigs || !filterConfigs) return { charKeyList: [], totalCharNum }
const charKeyList = database._getCharKeys()
.filter(filterFunction({ element, weaponType, favorite: "yes", name: deferredSearchTerm }, filterConfigs))
.sort(sortFunction(state.sortType, state.ascending, sortConfigs))
.concat(
database._getCharKeys()
.filter(filterFunction({ element, weaponType, favorite: "no", name: deferredSearchTerm }, filterConfigs))
.sort(sortFunction(state.sortType, state.ascending, sortConfigs)))
return dbDirty && { charKeyList, totalCharNum }
},
[dbDirty, database, sortConfigs, state.sortType, state.ascending, element, filterConfigs, weaponType, deferredSearchTerm])
const { charKeyListToShow, numPages, currentPageIndex } = useMemo(() => {
const numPages = Math.ceil(charKeyList.length / maxNumToDisplay)
const currentPageIndex = clamp(pageIdex, 0, numPages - 1)
return { charKeyListToShow: charKeyList.slice(currentPageIndex * maxNumToDisplay, (currentPageIndex + 1) * maxNumToDisplay), numPages, currentPageIndex }
}, [charKeyList, pageIdex, maxNumToDisplay])
const totalShowing = charKeyList.length !== totalCharNum ? `${charKeyList.length}/${totalCharNum}` : `${totalCharNum}`
return <Box my={1} display="flex" flexDirection="column" gap={1}>
<CardDark ref={invScrollRef} ><CardContent sx={{ display: "flex", flexDirection: "column", gap: 1 }}>
<Grid container spacing={1}>
<Grid item>
<WeaponToggle sx={{ height: "100%" }} onChange={weaponType => stateDispatch({ weaponType })} value={state.weaponType} size="small" />
</Grid>
<Grid item>
<ElementToggle sx={{ height: "100%" }} onChange={element => stateDispatch({ element })} value={state.element} size="small" />
</Grid>
<Grid item flexGrow={1}>
<TextField
autoFocus
value={searchTerm}
onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setSearchTerm(e.target.value)}
label={t("characterName")}
/>
</Grid>
<Grid item >
<SortByButton sx={{ height: "100%" }}
sortKeys={characterSortKeys} value={state.sortType} onChange={sortType => stateDispatch({ sortType })}
ascending={state.ascending} onChangeAsc={ascending => stateDispatch({ ascending })} />
</Grid>
</Grid>
<Grid container alignItems="flex-end">
<Grid item flexGrow={1}>
<Pagination count={numPages} page={currentPageIndex + 1} onChange={setPage} />
</Grid>
<Grid item>
<ShowingCharacter numShowing={charKeyListToShow.length} total={totalShowing} t={t} />
</Grid>
</Grid>
</CardContent></CardDark>
<Suspense fallback={<Skeleton variant="rectangular" sx={{ width: "100%", height: "100%", minHeight: 5000 }} />}>
<Grid container spacing={1} columns={columns}>
<Grid item xs={1} >
<CardDark sx={{ height: "100%", minHeight: 400, width: "100%", display: "flex", flexDirection: "column" }}>
<CardContent>
<Typography sx={{ textAlign: "center" }}><Trans t={t} i18nKey="addNew" /></Typography>
</CardContent>
<CharacterSelectionModal newFirst show={newCharacter} onHide={() => setnewCharacter(false)} onSelect={editCharacter} />
<Box sx={{
flexGrow: 1,
display: "flex",
justifyContent: "center",
alignItems: "center"
}}
>
<Button onClick={() => setnewCharacter(true)} color="info" sx={{ borderRadius: "1em" }}>
<Typography variant="h1"><FontAwesomeIcon icon={faPlus} className="fa-fw" /></Typography>
</Button>
</Box>
</CardDark>
</Grid>
{charKeyListToShow.map(charKey =>
<Grid item key={charKey} xs={1} >
<CharacterCard
characterKey={charKey}
onClick={() => navigate(`${charKey}`)}
footer={<><Divider /><Box sx={{ py: 1, px: 2, display: "flex", gap: 1, justifyContent: "space-between" }}>
<BootstrapTooltip placement="top" title={<Typography>{t("tabs.talent")}</Typography>}>
<IconButton onClick={() => navigate(`${charKey}/talent`)}>
<FactCheck />
</IconButton>
</BootstrapTooltip>
<BootstrapTooltip placement="top" title={<Typography>{t("tabs.equip")}</Typography>}>
<IconButton onClick={() => navigate(`${charKey}/equip`)} >
<Checkroom />
</IconButton>
</BootstrapTooltip>
<BootstrapTooltip placement="top" title={<Typography>{t("tabs.teambuffs")}</Typography>}>
<IconButton onClick={() => navigate(`${charKey}/teambuffs`)} >
<Groups />
</IconButton>
</BootstrapTooltip>
<BootstrapTooltip placement="top" title={<Typography>{t("tabs.optimize")}</Typography>}>
<IconButton onClick={() => navigate(`${charKey}/optimize`)} >
<Calculate />
</IconButton>
</BootstrapTooltip>
<Divider orientation="vertical" />
<BootstrapTooltip placement="top" title={<Typography>{t("delete")}</Typography>}>
<IconButton color="error" onClick={() => deleteCharacter(charKey)}>
<DeleteForever />
</IconButton>
</BootstrapTooltip>
</Box></>}
/>
</Grid>)}
</Grid>
</Suspense>
{numPages > 1 && <CardDark ><CardContent>
<Grid container alignItems="flex-end">
<Grid item flexGrow={1}>
<Pagination count={numPages} page={currentPageIndex + 1} onChange={setPage} />
</Grid>
<Grid item>
<ShowingCharacter numShowing={charKeyListToShow.length} total={totalShowing} t={t} />
</Grid>
</Grid>
</CardContent></CardDark>}
</Box>
}
Example #3
Source File: ResultsTable.tsx From nextclade with MIT License | 3 votes |
export function ResultsTable() {
const { t } = useTranslation()
const seqNamesImmediate = useRecoilValue(seqNamesFilteredAtom)
const seqNames = useDeferredValue(seqNamesImmediate)
const columnWidthsPx = useRecoilValue(resultsTableColumnWidthsPxAtom)
const dynamicColumnWidthPx = useRecoilValue(resultsTableDynamicColumnWidthPxAtom)
const cladeNodeAttrKeys = useRecoilValue(cladeNodeAttrKeysAtom)
const cladeNodeAttrDescs = useRecoilValue(cladeNodeAttrDescsAtom)
const isResultsFilterPanelCollapsed = useRecoilValue(isResultsFilterPanelCollapsedAtom)
const viewedGene = useRecoilValue(viewedGeneAtom)
const rowData: TableRowDatum[] = useMemo(() => {
return seqNames.map((seqName) => ({
seqName,
viewedGene,
columnWidthsPx,
dynamicColumnWidthPx,
cladeNodeAttrKeys,
}))
}, [cladeNodeAttrKeys, columnWidthsPx, dynamicColumnWidthPx, seqNames, viewedGene])
// TODO: we could use a map (object) and refer to filters by name,
// in order to reduce code duplication in the state, callbacks and components being rendered
const sortByIndexAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.index, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByIndexDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.index, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByNameAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.seqName, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByNameDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.seqName, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByQcIssuesAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.qcIssues, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByQcIssuesDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.qcIssues, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByCladeAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.clade, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByCladeDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.clade, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByTotalMutationsAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalMutations, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByTotalMutationsDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalMutations, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByTotalNonAcgtnAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalNonACGTNs, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByTotalNonAcgtnDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalNonACGTNs, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByTotalNsAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalMissing, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByTotalNsDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalMissing, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByTotalGapsAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalGaps, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByTotalGapsDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalGaps, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByTotalInsertionsAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalInsertions, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByTotalInsertionsDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalInsertions, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByTotalFrameShiftsAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalFrameShifts, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByTotalFrameShiftsDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalFrameShifts, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByTotalStopCodonsAsc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalStopCodons, direction: SortDirection.asc }), undefined) }, []) // prettier-ignore
const sortByTotalStopCodonsDesc = useRecoilCallback(({set}) => () => { set(sortAnalysisResultsAtom({ category: SortCategory.totalStopCodons, direction: SortDirection.desc }), undefined) }, []) // prettier-ignore
const sortByKey = useRecoilCallback(({ set }) => (key: string, direction: SortDirection) => () => {
set(sortAnalysisResultsByKeyAtom({ key, direction }), undefined)
}, []) // prettier-ignore
const dynamicColumns = useMemo(() => {
return cladeNodeAttrDescs.map(({ name: attrKey, displayName, description }) => {
const sortAsc = sortByKey(attrKey, SortDirection.asc)
const sortDesc = sortByKey(attrKey, SortDirection.desc)
return (
<TableHeaderCell key={attrKey} basis={dynamicColumnWidthPx} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{displayName}</TableCellText>
<ResultsControlsSort sortAsc={sortAsc} sortDesc={sortDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-clade" wide>
<h5>{`Column: ${displayName}`}</h5>
<p>{description}</p>
</ButtonHelpStyled>
</TableHeaderCell>
)
})
}, [cladeNodeAttrDescs, dynamicColumnWidthPx, sortByKey])
return (
<Table rounded={isResultsFilterPanelCollapsed}>
<TableHeaderRow>
<TableHeaderCell first basis={columnWidthsPx.id} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('ID')}</TableCellText>
<ResultsControlsSort sortAsc={sortByIndexAsc} sortDesc={sortByIndexDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-seq-id">
<HelpTipsColumnId />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.seqName} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('Sequence name')}</TableCellText>
<ResultsControlsSort sortAsc={sortByNameAsc} sortDesc={sortByNameDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-seq-name">
<HelpTipsColumnSeqName />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.qc} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('QC')}</TableCellText>
<ResultsControlsSort sortAsc={sortByQcIssuesAsc} sortDesc={sortByQcIssuesDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-qc">
<HelpTipsColumnQC />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.clade} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('Clade')}</TableCellText>
<ResultsControlsSort sortAsc={sortByCladeAsc} sortDesc={sortByCladeDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-clade" wide>
<HelpTipsColumnClade />
</ButtonHelpStyled>
</TableHeaderCell>
{dynamicColumns}
<TableHeaderCell basis={columnWidthsPx.mut} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('Mut.')}</TableCellText>
<ResultsControlsSort sortAsc={sortByTotalMutationsAsc} sortDesc={sortByTotalMutationsDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-mut">
<HelpTipsColumnMut />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.nonACGTN} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('non-ACGTN')}</TableCellText>
<ResultsControlsSort sortAsc={sortByTotalNonAcgtnAsc} sortDesc={sortByTotalNonAcgtnDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-nonacgtn">
<HelpTipsColumnNonAcgtn />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.ns} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('Ns')}</TableCellText>
<ResultsControlsSort sortAsc={sortByTotalNsAsc} sortDesc={sortByTotalNsDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-missing">
<HelpTipsColumnMissing />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.gaps} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('Gaps')}</TableCellText>
<ResultsControlsSort sortAsc={sortByTotalGapsAsc} sortDesc={sortByTotalGapsDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-gaps">
<HelpTipsColumnGaps />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.insertions} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('Ins.')}</TableCellText>
<ResultsControlsSort sortAsc={sortByTotalInsertionsAsc} sortDesc={sortByTotalInsertionsDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-insertions">
<HelpTipsColumnInsertions />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.frameShifts} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('FS')}</TableCellText>
<ResultsControlsSort sortAsc={sortByTotalFrameShiftsAsc} sortDesc={sortByTotalFrameShiftsDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-frame-shifts">
<HelpTipsColumnFrameShifts />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.stopCodons} grow={0} shrink={0}>
<TableHeaderCellContent>
<TableCellText>{t('SC')}</TableCellText>
<ResultsControlsSort sortAsc={sortByTotalStopCodonsAsc} sortDesc={sortByTotalStopCodonsDesc} />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-stop-codons">
<HelpTipsColumnStopCodons />
</ButtonHelpStyled>
</TableHeaderCell>
<TableHeaderCell basis={columnWidthsPx.sequenceView} grow={1} shrink={0}>
<TableHeaderCellContent>
<SequenceSelector />
</TableHeaderCellContent>
<ButtonHelpStyled identifier="btn-help-col-seq-view" tooltipWidth="600px">
<HelpTipsColumnSeqView />
</ButtonHelpStyled>
</TableHeaderCell>
</TableHeaderRow>
<AutoSizer>
{({ width, height }) => {
return (
<FixedSizeList
overscanCount={10}
style={LIST_STYLE}
width={width}
height={height - HEADER_ROW_HEIGHT}
itemCount={rowData.length}
itemSize={ROW_HEIGHT}
itemData={rowData}
>
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
{/* @ts-ignore */}
{ResultsTableRow}
</FixedSizeList>
)
}}
</AutoSizer>
</Table>
)
}