-
Notifications
You must be signed in to change notification settings - Fork 780
Basic UI: several fix for selection and switch with mappings #3368
Conversation
@resetnow : that is for you ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments are numbered so it's easier to track context.
@@ -478,12 +479,11 @@ | |||
item: _t.item, | |||
value: value | |||
})); | |||
_t.suppressUpdate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[1] I understand that you need to obtain some properties from server so you don't want to suppress the callback entirely...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[6] _t.suppressReset = true
@@ -494,12 +494,16 @@ | |||
_t.reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[2] ...but could you please implement another way to suppress the useless call to reset()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[4]
if (_t.suppressReset) {
_t.suppressReset = false;
return;
} else {
_t.reset();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[5] This has to do with animations and avoiding touching DOM too much
@@ -455,7 +455,8 @@ | |||
var | |||
_t = this; | |||
|
|||
_t.value = _t.parentNode.querySelector(o.formValue); | |||
_t.hasValue = _t.parentNode.getAttribute("data-has-value") === "true"; | |||
_t.value = _t.parentNode.parentNode.querySelector(o.formValue); | |||
_t.count = _t.parentNode.getAttribute("data-count") * 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[3] For example, _t.suppressReset = false
here.
@resetnow : thank you for your quick review, I fixed what you requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove a stray space, otherwise LGTM.
Thanks!
_t.value.innerHTML = value; | ||
} | ||
|
||
if (_t.count === 1) { | ||
return; | ||
} | ||
|
||
if (_t.suppressUpdateButtons ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(space here)
Space suppressed. |
Thanks! |
Fix #3143
Fix #3346
Fix #3349
Signed-off-by: Laurent Garnier lg.hc@free.fr