Merge pull request #556 from getmaxun/discard-fix

fix: capture text highlighting on discard
This commit is contained in:
Karishma Shukla
2025-04-30 19:35:55 +05:30
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -423,6 +423,8 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
}
});
resetListState();
stopPaginationMode();
stopLimitMode();
setShowPaginationOptions(false);
setShowLimitOptions(false);
setCaptureStage('initial');

View File

@@ -68,7 +68,10 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
socket?.emit('setPaginationMode', { pagination: true });
};
const stopPaginationMode = () => setPaginationMode(false);
const stopPaginationMode = () => {
setPaginationMode(false);
socket?.emit('setPaginationMode', { pagination: false });
};
const startLimitMode = () => {
setLimitMode(true);
@@ -88,6 +91,7 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
const stopGetList = () => {
setGetList(false);
socket?.emit('setGetList', { getList: false });
setPaginationType('');
setLimitType('');
setCustomLimit('');