fix: correct structure for list settings

This commit is contained in:
karishmas6
2024-08-10 21:00:27 +05:30
parent 8bb8ea2afe
commit 47148e1863

View File

@@ -82,7 +82,7 @@ export const RightSidePanel = () => {
const getListSettingsObject = useCallback(() => {
const settings: Record<string, { listSelector: string; fields: Record<string, { selector: string; tag?: string;[key: string]: any }> }> = {};
let settings: { listSelector?: string; fields?: Record<string, { selector: string; tag?: string; [key: string]: any }> } = {};
browserSteps.forEach(step => {
if (step.type === 'list' && step.listSelector && Object.keys(step.fields).length > 0) {
@@ -97,10 +97,11 @@ export const RightSidePanel = () => {
}
});
settings[step.listSelector] = {
settings = {
listSelector: step.listSelector,
fields: fields
};
};
}
});