fix(webui): don't disappear selectors while adding entries if input has been made
ci/woodpecker/push/woodpecker Pipeline was successful Details

feat/users
Tomáš Mládek 2024-03-31 16:24:05 +02:00
parent 68e7d67d7b
commit 4d8ac0717d
2 changed files with 3 additions and 2 deletions

View File

@ -145,6 +145,7 @@
current = undefined;
dispatch('input', current);
}
$: if (!inputValue) reset();
let options: SelectorOption[] = [];
let searchResult: UpListing | undefined = undefined;

View File

@ -56,7 +56,7 @@
let newEntryValue: SelectorValue | undefined;
$: if (adding && newAttrSelector) newAttrSelector.focus();
$: if (!addFocus && !addHover) adding = false;
$: if (!addFocus && !addHover && !newEntryAttribute && !newEntryValue) adding = false;
async function addEntry(attribute: string, value: SelectorValue) {
dispatch('change', {
@ -352,7 +352,7 @@
<div class="cell mark-attribute">
<Selector
types={['Attribute', 'NewAttribute']}
on:input={(ev) => (newEntryAttribute = ev.detail.name)}
on:input={(ev) => (newEntryAttribute = ev.detail?.name)}
on:focus={(ev) => (addFocus = ev.detail)}
keepFocusOnSet
bind:this={newAttrSelector}