修复定时任务每页数据量大时搜索卡顿

This commit is contained in:
whyour 2023-01-07 18:19:03 +08:00
parent c63bcd7706
commit dcfb72143a
2 changed files with 1 additions and 8 deletions

View File

@ -112,7 +112,6 @@ const Crontab = () => {
style={{ cursor: 'point' }}
onClick={(e) => {
e.stopPropagation();
setSearchValue(`label:${label}`);
setSearchText(`label:${label}`);
}}
>
@ -378,7 +377,6 @@ const Crontab = () => {
const [viewConf, setViewConf] = useState<any>();
const [isDetailModalVisible, setIsDetailModalVisible] = useState(false);
const [detailCron, setDetailCron] = useState<any>();
const [searchValue, setSearchValue] = useState('');
const [total, setTotal] = useState<number>();
const [isCreateViewModalVisible, setIsCreateViewModalVisible] =
useState(false);
@ -945,8 +943,6 @@ const Crontab = () => {
enterButton
allowClear
loading={loading}
value={searchValue}
onChange={(e) => setSearchValue(e.target.value)}
onSearch={onSearch}
/>,
<Button key="2" type="primary" onClick={() => addCron()}>

View File

@ -243,11 +243,10 @@ const Subscription = () => {
const [searchText, setSearchText] = useState('');
const [currentPage, setCurrentPage] = useState(1);
const [pageSize, setPageSize] = useState(20);
const [searchValue, setSearchValue] = useState('');
const [isLogModalVisible, setIsLogModalVisible] = useState(false);
const [logSubscription, setLogSubscription] = useState<any>();
const tableRef = useRef<any>();
const tableScrollHeight = useTableScrollHeight(tableRef)
const tableScrollHeight = useTableScrollHeight(tableRef);
const runSubscription = (record: any, index: number) => {
Modal.confirm({
@ -553,8 +552,6 @@ const Subscription = () => {
enterButton
allowClear
loading={loading}
value={searchValue}
onChange={(e) => setSearchValue(e.target.value)}
onSearch={onSearch}
/>,
<Button key="2" type="primary" onClick={() => addSubscription()}>