chore: lint
This commit is contained in:
@@ -133,15 +133,15 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
const getListSettingsObject = useCallback(() => {
|
const getListSettingsObject = useCallback(() => {
|
||||||
let settings: {
|
let settings: {
|
||||||
listSelector?: string;
|
listSelector?: string;
|
||||||
fields?: Record<string, { selector: string; tag?: string; [key: string]: any }>;
|
fields?: Record<string, { selector: string; tag?: string;[key: string]: any }>;
|
||||||
pagination?: { type: string; selector?: string };
|
pagination?: { type: string; selector?: string };
|
||||||
limit?: number;
|
limit?: number;
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
browserSteps.forEach(step => {
|
browserSteps.forEach(step => {
|
||||||
if (step.type === 'list' && step.listSelector && Object.keys(step.fields).length > 0) {
|
if (step.type === 'list' && step.listSelector && Object.keys(step.fields).length > 0) {
|
||||||
const fields: Record<string, { selector: string; tag?: string; [key: string]: any }> = {};
|
const fields: Record<string, { selector: string; tag?: string;[key: string]: any }> = {};
|
||||||
|
|
||||||
Object.entries(step.fields).forEach(([id, field]) => {
|
Object.entries(step.fields).forEach(([id, field]) => {
|
||||||
if (field.selectorObj?.selector) {
|
if (field.selectorObj?.selector) {
|
||||||
fields[field.label] = {
|
fields[field.label] = {
|
||||||
@@ -151,7 +151,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
listSelector: step.listSelector,
|
listSelector: step.listSelector,
|
||||||
fields: fields,
|
fields: fields,
|
||||||
@@ -160,10 +160,10 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
}, [browserSteps, paginationType, limitType, customLimit]);
|
}, [browserSteps, paginationType, limitType, customLimit]);
|
||||||
|
|
||||||
const resetListState = useCallback(() => {
|
const resetListState = useCallback(() => {
|
||||||
setShowPaginationOptions(false);
|
setShowPaginationOptions(false);
|
||||||
updatePaginationType('');
|
updatePaginationType('');
|
||||||
|
|||||||
Reference in New Issue
Block a user