Open shadabbuchh opened 1 year ago
HI @shadabbuchh @somangshu I can see similar issue in currency Widget.
Steps to reproduce:
I can see similar issue in Checkbox group widget.
For this type of issue, the error message is cleared when we change the input field.
May be appsmith team did it in this way for widgets.
I don't have clarity on how to proceed with this issue.
What are your thoughts on this?
@somangshu @Nikhil-Nandagopal @shadabbuchh The validation function is triggered when the user changes the input field. However, even though isAllowHalf is true, the validation function is not called, nor is the validation message cleared, when the user focuses on the input field. The validation message is only cleared when the user starts typing in the input field. I have checked other widgets and found no instance where the validation function is called on focus.
To address this, I plan to create a wrapper for the existing input field(new feature) to ensure the validation function is called when the input field is focused.
Please let me know if I am missing anything.
@somangshu @Nikhil-Nandagopal @shadabbuchh
@SaiCharanChetpelly31 is working on this issue,
At present, we have explored how this validation is working in abstract terms it is
component calls worker saga, worker saga has validation logic, but in the validation logic there is a check that input value is changed or not
if its not changed then validation does not run.
so proposed solution:
pass a flag = true from the component (onFocus) → saga → worker, and update worker to skip checking if input value is changed
when flag is true and thus run validation
another version of same to implement a new function and link it to onFocus
Check can we write some logic A, which calls the validation as in point 1 and 2, and this logic A should run when the related constraint changes, for example in this case, we are switching allowHalfStar from false to true, then logic A should automatically run, and should thus remove the error associated with decimals
for giving an example of point 3: let some saga invoke a validation when allowHalfStart switches | check what possible implications can it have?, will it be a bad solution, if so why?
Let us know which solution is recommended?
Is there an existing issue for this?
Description
Upon enabling the
Allow Half Stars
property, the error message that appears when the user enters a decimal value forDefault Value
does not disappear. However once we do a hard refresh, the error message disappears.https://www.loom.com/share/92fc1e089d5145e4bba01941792818c8
Steps To Reproduce
Default Value
property.Allow Half Stars
property.Public Sample App
No response
Version
Cloud