M: Always show search for RSList

This commit is contained in:
Ivan 2025-06-17 20:43:27 +03:00
parent 5e2f623271
commit 018e6c7215

View File

@ -2,7 +2,6 @@
import { useState } from 'react'; import { useState } from 'react';
import { toast } from 'react-toastify'; import { toast } from 'react-toastify';
import clsx from 'clsx';
import fileDownload from 'js-file-download'; import fileDownload from 'js-file-download';
import { MiniButton } from '@/components/control'; import { MiniButton } from '@/components/control';
@ -124,30 +123,31 @@ export function EditorRSList() {
return false; return false;
} }
const tableHeight = useFitHeight(isContentEditable ? '4rem + 5px' : '2rem'); const tableHeight = useFitHeight('4rem + 5px');
return ( return (
<div tabIndex={-1} onKeyDown={handleKeyDown} className='relative pt-8'> <div tabIndex={-1} onKeyDown={handleKeyDown} className='relative pt-8'>
{isContentEditable ? ( {isContentEditable ? (
<ToolbarRSList className='cc-tab-tools right-4 md:right-1/2 -translate-x-1/2 md:translate-x-0 cc-animate-position' /> <ToolbarRSList className='cc-tab-tools right-4 md:right-1/2 -translate-x-1/2 md:translate-x-0 cc-animate-position' />
) : null} ) : null}
{isContentEditable ? (
<div className='flex items-center border-b'> <div className='flex items-center border-b'>
{isContentEditable ? (
<div className='px-2'> <div className='px-2'>
Выбор {selected.length} из {schema.stats?.count_all} Выбор {selected.length} из {schema.stats?.count_all}
</div> </div>
<SearchBar ) : null}
id='constituents_search' <SearchBar
noBorder id='constituents_search'
className='max-w-50' noBorder
query={filterText} className='max-w-50'
onChangeQuery={setFilterText} query={filterText}
/> onChangeQuery={setFilterText}
</div> />
) : null} </div>
<MiniButton <MiniButton
className={clsx('absolute z-pop right-4 hidden sm:block', isContentEditable ? 'top-18' : 'top-8')} className='absolute z-pop right-4 hidden sm:block top-18'
title='Выгрузить в формате CSV' title='Выгрузить в формате CSV'
icon={<IconCSV size='1.25rem' className='icon-green' />} icon={<IconCSV size='1.25rem' className='icon-green' />}
onClick={handleDownloadCSV} onClick={handleDownloadCSV}