mavo
mavo copied to clipboard
'or' expression bug?
Hi,
Following #832, regarding fake inputs
After playing with Dmitri's codepen, I realize it doesn' work :(
I change it here so, both 'fake' inputs are displayed: while edited, both 'fake' properties send data to [destination] correctly
BUT new 'destination' value is not refreshed to fake inputs
it refreshes only to one
is the expression 'or
' inside mv-value="bar or foo"
processed correctly? -> bug?
I found a workaround doing a loop through properties like this
<div property="x" mv-default="[z]"> </div>
<div property="y" mv-default="[x]"> </div>
<div property="z" mv-default="[y]"> </div>
but this method is painfull as I need to be sure that all mv-default values loop to each other each time.
The previous version of the “fake editing hack” took advantage of the way mv-if
was designed: if a node is not in the DOM tree, the corresponding property is treated as not existing. So this hack could work only with mv-if
, and since it's not there we have a loop in the foo or bar
expression Mavo doesn't know how to resolve.
I'm not sure that it's a bug of the or
operator (@LeaVerou will correct me if I'm wrong). However, I believe when this issue is closed, your usecases will be addressed automatically (without any ugly hacks), right?
Thank you @DmitrySharabin
Despite my search on issues, I don't see this previous issue....since 2018 (wow!) :)
Hope this feature is still a need for others too: would be a great feature to have with mavo.
I've been trying to do different hacks, but yes, they are all ugly
Is there a way to merge this topic with issue #386 ? Feel free to close my issue if you consider to be a duplicate from previous one