mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 23:18:37 +00:00
🐛 fix(ratio-sync): reset pagination when filter/search changes
Add a `useEffect` hook in `UpstreamRatioSync.js` to automatically set `currentPage` to `1` whenever `ratioTypeFilter` or `searchKeyword` updates. This prevents the table from appearing empty when users switch to the “model_price” (fixed price) filter or perform a new search while on a later page. Additional changes: - Import `useEffect` from React. This enhancement delivers a smoother UX by ensuring the first page of results is always shown after any filtering action.
This commit is contained in:
@@ -455,6 +455,7 @@ export default function ModelSettingsVisualEditor(props) {
|
||||
setCurrentPage(1);
|
||||
}}
|
||||
style={{ width: 200 }}
|
||||
showClear
|
||||
/>
|
||||
<Checkbox
|
||||
checked={conflictOnly}
|
||||
|
||||
Reference in New Issue
Block a user