Closed Dolfik1 closed 2 years ago
At this moment we can add extra attributes via WithAttribute function. This way is very slow because we duplicate element on each WithAttribute call. This PR adds extraAttributes key to all views:
WithAttribute
extraAttributes
View.Label( text = "Hello, world!", extraAttributes = [ key "helloworld" row 0 column 1 ] )
extraAttributes preallocates space in beginning of array and call WithAttribute function for each value in extraAttributes.
I discussed this with @TimLariviere and this will be available in Fabulous v2 which he currently works on.
I will close this PR because this is planned in v2 with a new way for handling this.
At this moment we can add extra attributes via WithAttribute function. This way is very slow because we duplicate element on each
WithAttribute
call. This PR addsextraAttributes
key to all views:extraAttributes
preallocates space in beginning of array and callWithAttribute
function for each value inextraAttributes
.