mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-29 08:12:56 +00:00
feat(frontend): add table actions navigation (#1298)
* feat(frontend): add table actions navigation * feat(frontend): add table actions navigation * feat(frontend): add table actions navigation
This commit is contained in:
@@ -52,7 +52,15 @@
|
||||
const currentIndex = sortedGridItems.findIndex((item) => item.id === $selectedComponent)
|
||||
|
||||
if (currentIndex !== -1 && currentIndex > 0) {
|
||||
$selectedComponent = sortedGridItems[currentIndex - 1].id
|
||||
const left = sortedGridItems[currentIndex - 1]
|
||||
|
||||
if (left.data.type === 'tablecomponent') {
|
||||
if (left.data.actionButtons.length >= 1) {
|
||||
$selectedComponent = left.data.actionButtons[left.data.actionButtons.length - 1].id
|
||||
} else {
|
||||
$selectedComponent = left.id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +69,12 @@
|
||||
|
||||
function right(event: KeyboardEvent) {
|
||||
let r = $componentControl[$selectedComponent!]?.right?.()
|
||||
|
||||
if (typeof r === 'string') {
|
||||
$selectedComponent = r
|
||||
r = $componentControl[r]?.right?.(true)
|
||||
}
|
||||
|
||||
if (!r) {
|
||||
const sortedGridItems = getGridItems()
|
||||
const currentIndex = sortedGridItems.findIndex((item) => item.id === $selectedComponent)
|
||||
|
||||
Reference in New Issue
Block a user