components work without 'key' attribute set
This commit is contained in:
parent
2ced690387
commit
e94071b077
2 changed files with 4 additions and 4 deletions
|
|
@ -228,9 +228,9 @@ proc eq(a, b: VNode): EqResult =
|
||||||
if a.text != b.text:
|
if a.text != b.text:
|
||||||
when defined(profileKarax): inc reasons[deComponent]
|
when defined(profileKarax): inc reasons[deComponent]
|
||||||
return different
|
return different
|
||||||
if VComponent(a).key.isNil and VComponent(b).key.isNil:
|
#if VComponent(a).key.isNil and VComponent(b).key.isNil:
|
||||||
when defined(profileKarax): inc reasons[deComponent]
|
# when defined(profileKarax): inc reasons[deComponent]
|
||||||
return different
|
# return different
|
||||||
if VComponent(a).key != VComponent(b).key:
|
if VComponent(a).key != VComponent(b).key:
|
||||||
when defined(profileKarax): inc reasons[deComponent]
|
when defined(profileKarax): inc reasons[deComponent]
|
||||||
return different
|
return different
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ proc newTextInput*(style: VStyle = VStyle(); key: cstring;
|
||||||
result = newComponent(TextInput, render, changed=changed, updated=update)
|
result = newComponent(TextInput, render, changed=changed, updated=update)
|
||||||
result.style = style
|
result.style = style
|
||||||
result.value = value
|
result.value = value
|
||||||
result.key = key
|
#result.key = key
|
||||||
|
|
||||||
when false:
|
when false:
|
||||||
type
|
type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue