feat: -rm pagination
This commit is contained in:
@@ -54,8 +54,6 @@ export const BrowserWindow = () => {
|
|||||||
const [showAttributeModal, setShowAttributeModal] = useState(false);
|
const [showAttributeModal, setShowAttributeModal] = useState(false);
|
||||||
const [attributeOptions, setAttributeOptions] = useState<AttributeOption[]>([]);
|
const [attributeOptions, setAttributeOptions] = useState<AttributeOption[]>([]);
|
||||||
const [selectedElement, setSelectedElement] = useState<{ selector: string, info: ElementInfo | null } | null>(null);
|
const [selectedElement, setSelectedElement] = useState<{ selector: string, info: ElementInfo | null } | null>(null);
|
||||||
const [isSelectingPagination, setIsSelectingPagination] = useState(false);
|
|
||||||
|
|
||||||
const [listSelector, setListSelector] = useState<string | null>(null);
|
const [listSelector, setListSelector] = useState<string | null>(null);
|
||||||
const [fields, setFields] = useState<Record<string, TextStep>>({});
|
const [fields, setFields] = useState<Record<string, TextStep>>({});
|
||||||
|
|
||||||
@@ -150,11 +148,6 @@ export const BrowserWindow = () => {
|
|||||||
|
|
||||||
const options = getAttributeOptions(highlighterData.elementInfo?.tagName || '', highlighterData.elementInfo);
|
const options = getAttributeOptions(highlighterData.elementInfo?.tagName || '', highlighterData.elementInfo);
|
||||||
|
|
||||||
if (isSelectingPagination) {
|
|
||||||
socket?.emit('paginationSelected', { selector: highlighterData.selector });
|
|
||||||
setIsSelectingPagination(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getText === true) {
|
if (getText === true) {
|
||||||
if (options.length === 1) {
|
if (options.length === 1) {
|
||||||
// Directly use the available attribute if only one option is present
|
// Directly use the available attribute if only one option is present
|
||||||
@@ -273,18 +266,6 @@ export const BrowserWindow = () => {
|
|||||||
setShowAttributeModal(false);
|
setShowAttributeModal(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const handleStartPaginationSelection = () => {
|
|
||||||
setIsSelectingPagination(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
socket?.on('startPaginationSelection', handleStartPaginationSelection);
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
socket?.off('startPaginationSelection', handleStartPaginationSelection);
|
|
||||||
};
|
|
||||||
}, [socket]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div onClick={handleClick}>
|
<div onClick={handleClick}>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user