Fixed initial select value

ref #91
This commit is contained in:
Nicolai Ort 2021-03-17 10:16:22 +01:00
parent bc2a8caf3e
commit d3a3de2eac

View File

@ -74,8 +74,8 @@
text: "updating team",
duration: 2500,
}).showToast();
teamdata.parentGroup = teamdata.parentGroup.id;
let postdata = teamdata;
postdata.parentGroup = teamdata.parentGroup.id;
postdata.contact = postdata.contact === "null" ? null : postdata.contact;
RunnerTeamService.runnerTeamControllerPut(original.id, postdata)
.then((resp) => {
@ -371,10 +371,9 @@
option.id.toString().startsWith(filterText.toLowerCase())}
items={orgs}
showChevron={true}
placeholder={$_('search-for-runner-by-name-or-id')}
noOptionsMessage={$_('no-runners-found')}
selectedValue={undefined || orgs.find((r) => (r.id = original.parentGroup.id))}
on:select={(selectedValue) => (teamdata.parentGroup == selectedValue.detail)}
placeholder={$_('search-for-an-organization-by-name-or-id')}
noOptionsMessage={$_('no-organizations-found')}
bind:selectedValue={teamdata.parentGroup}
on:clear={()=>(teamdata.parentGroup = null)} />
</div>
</section>