focus balk onder aan paneel
This commit is contained in:
@@ -910,6 +910,24 @@ function scrollCurrentRowIntoView(pane) {
|
||||
}
|
||||
}
|
||||
|
||||
function updatePaneFocusLine(pane) {
|
||||
const model = paneState(pane);
|
||||
const focusLine = document.getElementById(`${pane}-focus-line`);
|
||||
if (!focusLine) {
|
||||
return;
|
||||
}
|
||||
if (!Array.isArray(model.visibleItems) || model.currentRowIndex < 0 || model.currentRowIndex >= model.visibleItems.length) {
|
||||
focusLine.textContent = "—";
|
||||
return;
|
||||
}
|
||||
const item = model.visibleItems[model.currentRowIndex];
|
||||
if (!item) {
|
||||
focusLine.textContent = "—";
|
||||
return;
|
||||
}
|
||||
focusLine.textContent = item.isParent ? "../" : (item.name || "—");
|
||||
}
|
||||
|
||||
function renderPaneItems(pane) {
|
||||
const model = paneState(pane);
|
||||
const items = document.getElementById(`${pane}-items`);
|
||||
@@ -917,6 +935,7 @@ function renderPaneItems(pane) {
|
||||
|
||||
if (!Array.isArray(model.visibleItems) || model.visibleItems.length === 0) {
|
||||
model.currentRowIndex = -1;
|
||||
updatePaneFocusLine(pane);
|
||||
updateActionButtons();
|
||||
return;
|
||||
}
|
||||
@@ -1039,6 +1058,7 @@ function renderPaneItems(pane) {
|
||||
}
|
||||
items.append(row);
|
||||
});
|
||||
updatePaneFocusLine(pane);
|
||||
updateActionButtons();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user