Replies: 14 comments
-
You have two options to alleviate this issue:
|
Beta Was this translation helpful? Give feedback.
-
I'm using Input, not QInput, as I don't like the styling on the later (way too much vertical spacing). The docs don't mention the debounce attribute for this, and it seems to help, actually, to set it down to 50 or so. But I don't understand why it still flickers. Is this JustPy or Quasar? Also, how do I filter the input? I want to use type=text but filter for numbers and '.' for example, and I don't want to use type=numbers because I don't want the inc/dec arrows since it's a floating point number. Thanks for your help, and I really love your framework, but it could use more documentation in general, especially what attributes are supported (I have to go searching the source code to see that). But overall great job! |
Beta Was this translation helpful? Give feedback.
-
Also, InputChangeOnly deletes the entire entry if a Return isn't hit within the debounce period, is this intended behavior? |
Beta Was this translation helpful? Give feedback.
-
I tried replicating the problem with the program below, but it seems to be working fine for me. Which browser are you using? Sorry for the delayed response, I was out in nature. I think that you probably don't need to use debounce with InputChangeOnly because the events are not frequent. import justpy as jp
def input_change(self, msg):
wp = msg.page
wp.d.text = self.value
def input_test():
wp = jp.WebPage()
jp.InputChangeOnly(a=wp, classes=jp.Styles.input_classes, change=input_change, debounce=500)
wp.d = jp.Div(text='Text from input will go here', classes='m-1 p-1 text-xl border', a=wp)
return wp
jp.justpy(input_test) As for filtering input, if it is not done in the browser, but on the server, then you need to handle every input event. That is why I recommend using QInput. Have you tried using the |
Beta Was this translation helpful? Give feedback.
-
I'm using Chrome. So your example works fine, but not when I use it in a more complicated app. I'll try to minimize the code required to trigger this. Filtering: I don't understand how I would do this in the browser? So InputChangeOnly looks fine, but QInput has very strange styling (the blue underline is waaaay below the input field). Is that just Quasar, or JustPy? |
Beta Was this translation helpful? Give feedback.
-
The JustPy QInput component is a wrapper around the Quasar QInput component that does the filtering in the browser. To do it in the browser, you would need to write your own advanced component (https://justpy.io/tutorial/advanced_components/) Please take a look at https://v1.quasar.dev/vue-components/input |
Beta Was this translation helpful? Give feedback.
-
Another urgent question: how do I configure for use with HTTPS? |
Beta Was this translation helpful? Give feedback.
-
Sorry, just found config options for that. Disregard this then, unless there are any known issues with using HTTPS with JustPy. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I found out what my first issue is: I was running a background task that updates certain fields on a page, while trying to enter values into other fields. Of course the updates overwrite what I'm typing, then re-render correctly, causing a flicker. And for InputChangeOnly it erases the input entirely. I don't suppose there's any way of targeting the updates? This is a real problem for what I'm trying to do. |
Beta Was this translation helpful? Give feedback.
-
You can update just specific components, not the whole page. |
Beta Was this translation helpful? Give feedback.
-
The example adds a new div and that works, but I'm trying to update the text within a div, and that doesn't seem to update, is that right? |
Beta Was this translation helpful? Give feedback.
-
If you could post a small example, I would be happy to take a look.
|
Beta Was this translation helpful? Give feedback.
-
Ha! that worked! It needs the "temp" magic else it just renders that component alone. I didn't find any reference to this option in your docs (or source code with a brief search?), so it'd be great if that was added. There seems to be a lot of great features that aren't always obvious from the docs (not complaining, just encouraging). This solves my issues, thanks so much, and keep up the good work! |
Beta Was this translation helpful? Give feedback.
-
This looks like multiple issues. Please file separate issues per problem |
Beta Was this translation helpful? Give feedback.
-
It appears background input checkers are sometimes backspacing after the user enters in a char, then it appears again. This happens when typing moderately fast. It sometimes even misses capturing the user input altogether.
This is very disconcerting. Is there some way of affecting this behavior?
Beta Was this translation helpful? Give feedback.
All reactions