default userComplete.populate
parent
691f4bceba
commit
c11f3e27a5
|
@ -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;
|
||||
|
|
|
@ -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 = () => {
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue