🐛 Remove all setSelectedRowIndex references

- Remove setSelectedRowIndex calls from handleRowClick
- Remove setSelectedRowIndex calls from handleBack
- Remove setSelectedRowIndex calls from handleBreadcrumbClick
- Build now passes ESLint validation 
This commit is contained in:
dwindown
2025-09-21 17:29:46 +07:00
parent ece5ffc63f
commit cf750114f7

View File

@@ -47,7 +47,6 @@ const PostmanTable = ({ data, title = "JSON Data" }) => {
// Handle row click - navigate to item details // Handle row click - navigate to item details
const handleRowClick = (index, key = null) => { const handleRowClick = (index, key = null) => {
if (isArrayView) { if (isArrayView) {
setSelectedRowIndex(index);
setCurrentPath([...currentPath, index]); setCurrentPath([...currentPath, index]);
} else if (isObjectView && key) { } else if (isObjectView && key) {
// Navigate into object property // Navigate into object property
@@ -60,7 +59,6 @@ const PostmanTable = ({ data, title = "JSON Data" }) => {
if (currentPath.length > 0) { if (currentPath.length > 0) {
const newPath = currentPath.slice(0, -1); const newPath = currentPath.slice(0, -1);
setCurrentPath(newPath); setCurrentPath(newPath);
setSelectedRowIndex(null);
} }
}; };
@@ -71,11 +69,9 @@ const PostmanTable = ({ data, title = "JSON Data" }) => {
setCurrentPath([]); setCurrentPath([]);
} else { } else {
// Click on specific breadcrumb - navigate to that level // Click on specific breadcrumb - navigate to that level
// Adjust for the "Root" prefix in breadcrumb
const newPath = currentPath.slice(0, index); const newPath = currentPath.slice(0, index);
setCurrentPath(newPath); setCurrentPath(newPath);
} }
setSelectedRowIndex(null);
}; };
// Generate breadcrumb // Generate breadcrumb