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

Using decimal step sizes in range #137

Open
PGimenez opened this issue Dec 11, 2024 · 2 comments
Open

Using decimal step sizes in range #137

PGimenez opened this issue Dec 11, 2024 · 2 comments

Comments

@PGimenez
Copy link
Member

PGimenez commented Dec 11, 2024

It seems it is not possible to have decimal range step size. Here's a MWE with what I've tried:

using GenieFramework
@genietools

@app begin
  @in range= RangeData(UnitRange(0.0,1.0))
  @in qrange= StippleUI.Ranges.QRange(0.0,0.1,1.0)
  @onchange range begin
    @show range
  end
  @onchange qrange begin
    @show qrange
  end
end
ui() = range(0:0.1:1.0,:range)*range(0:0.1:1.0,:qrange)

@page("/", ui)

This is the HTML that's generated:

<q-range :min=0.0 v-model="range" :max=1.0 :step=0.1>
</q-range><q-range :min=0.0 v-model="qrange" :max=1.0 :step=0.1></q-range>

The RangeDatatype does not directly accept floats, so you have to pass a UnitRangeto it. However, the range does not work the browser and the console shows an error:

CleanShot 2024-12-11 at 10 49 24

On the other hand the q-range bound to the QRange object does nothing, the handler is not triggered.

@essenciary
Copy link
Member

@PGimenez Does Quasar support it? If it does, then we can do it too...

@essenciary
Copy link
Member

Yes, quasar does support it - so we can add it.

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

2 participants