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