default userComplete.populate

js-sound-v2
Thibault Duplessis 2020-09-12 08:43:33 +02:00
parent 691f4bceba
commit c11f3e27a5
6 changed files with 1 additions and 6 deletions

View File

@ -88,7 +88,7 @@ interface UserCompleteOpts {
input: HTMLInputElement,
tag?: 'a' | 'span';
minLength?: number;
populate: (result: LightUser) => string;
populate?: (result: LightUser) => string;
onSelect?: (result: LightUser) => void;
focus?: boolean;
friend?: boolean;

View File

@ -10,7 +10,6 @@ export function app($wrap: Cash, toggle: () => void) {
input: $input[0] as HTMLInputElement,
friend: true,
focus: true,
populate: r => r.name,
onSelect: r => execute(r.name)
});
const close = () => {

View File

@ -49,7 +49,6 @@ export default function(opts: ChallengeOpts) {
friend: true,
tag: 'span',
focus: true,
populate: r => r.name,
onSelect: () => setTimeout(() => (input.parentNode as HTMLFormElement).submit(), 100)
})
)

View File

@ -83,7 +83,6 @@ li.load.then(() => {
const start = () => userComplete().then(uac =>
uac({
input: this,
populate: r => r.name,
friend: $(this).data('friend'),
tag: $(this).data('tag'),
focus

View File

@ -24,7 +24,6 @@ export function input(ctrl: TournamentController): VNode {
swiss: ctrl.data.id,
tag: 'span',
focus: true,
populate: r => r.name,
onSelect(r) {
ctrl.jumpToPageOf(r.id);
ctrl.redraw();

View File

@ -24,7 +24,6 @@ export function input(ctrl: TournamentController): VNode {
tour: ctrl.data.id,
tag: 'span',
focus: true,
populate: r => r.name,
onSelect(v) {
ctrl.jumpToPageOf(v.id);
ctrl.redraw();