(
listKey,
{
switchToEditList = false,
focusTextarea = false,
scrollToBottom = false,
} = {}
)
| 811 | return getFirstAvailableImportListKey(); |
| 812 | } |
| 813 | async function selectListAndRefreshTextarea( |
| 814 | listKey, |
| 815 | { |
| 816 | switchToEditList = false, |
| 817 | focusTextarea = false, |
| 818 | scrollToBottom = false, |
| 819 | } = {} |
| 820 | ) { |
| 821 | if (!listKey || !UI.listTab2) return false; |
| 822 | if (!selectOptionByValue(UI.listTab2, listKey)) { |
| 823 | console.warn(`[selectListAndRefreshTextarea] List not found: ${listKey}`); |
| 824 | return false; |
| 825 | } |
| 826 | |
| 827 | await loadSelectedDorkListContent(); |
| 828 | if (switchToEditList) { |
| 829 | showDorkList({ focusTextarea }); |
| 830 | } |
| 831 | if (scrollToBottom) { |
| 832 | scrollPayloadToBottom(); |
| 833 | } |
| 834 | return true; |
| 835 | } |
| 836 | function resetDorkListSelections() { |
| 837 | UI.allListDropdowns.forEach((list) => { |
| 838 | if (list) list.value = "0"; |
no test coverage detected