Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error transforming component with a helper that does not use positional params as an attribute #249

Open
devotox opened this issue Feb 25, 2020 · 0 comments

Comments

@devotox
Copy link

devotox commented Feb 25, 2020

Original

{{#ct-input
        classNames="flex-grow"
        type="time"
        label="Arrive between"
        clearable=(not readOnly)
        disabled=readOnly
        defaultDate=(luxon hour=8 minute=0)
        placeholder="Now"
        date=stop.timeWindowEarliestTime

        onClear=(pipe
          (action (mut stop.timeWindowEarliestTime) null)
          (ct-orm "saveStopOfPlan" stop)
        )

        onSave=(pipe
          (action (mut stop.timeWindowEarliestTime))
          (ct-orm "saveStopOfPlan" stop)
        )
        as |input|
      }}

Transformation

 <CtInput 
    @classNames="flex-grow" 
    @type="time" 
    @label="Arrive between" 
    @clearable={{not readOnly}} 
    @disabled={{readOnly}} 
    @defaultDate=<Luxon @hour={{8}} @minute={{0}} /> 
    @placeholder="Now" 
    @date={{stop.timeWindowEarliestTime}} 
    @onClear={{pipe (action (mut stop.timeWindowEarliestTime) ) (ct-orm "saveStopOfPlan" stop)}} 
    @onSave={{pipe (action (mut stop.timeWindowEarliestTime)) (ct-orm "saveStopOfPlan" stop)
}} as |input|>

As you can see the issue here is with defaultDate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant