🐛 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user