-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: Handle invalid input in TimeFieldMinMax, resolve missing CSS reference, and remove classnames #110
Conversation
- Added input validation for TimeField to handle invalid time entries - Updated `onModify` logic to validate and parse user input before setting the value. - Disabled the confirm button for invalid inputs - Removed missing CSS file reference (`timeFieldMinMaxView.css`)
} | ||
App.console().log(meeting.getValue() + ""); | ||
}); | ||
.onModify(e -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use onValueChange
and the get the value from the event's payload
confirm.setEnabled(true); | ||
} catch (Exception ex) { | ||
confirm.setEnabled(false); | ||
App.console().log("Invalid time input: " + e.getText()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no browser console logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -14,7 +13,6 @@ | |||
|
|||
import java.time.LocalTime; | |||
|
|||
@InlineStyleSheet("context://css/fields/timefield/timeFieldMinMaxView.css") | |||
@Route | |||
@FrameTitle("Time Field Min/Max") | |||
public class TimeFieldMinMaxView extends Composite<FlexLayout> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do something useful with the confirm button. A toast ?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented a toast to confirm the action
- Added validation to ensure the Confirm button is only enabled for valid, non-empty time inputs. - Updated toast message to confirm the action
- Updated the `TimeFieldMinMaxView` class to use `onValueChange` instead of `onModify`.
Quality Gate passedIssues Measures |
onModify
logic to validate and parse user input before setting the value.timeFieldMinMaxView.css
)closes #106 and closes #105