Skip to content

fix(*): Fix ReportValidity/CheckValidity return types.#268

Open
dkamburov wants to merge 1 commit into
masterfrom
dkamburov/fix-38495
Open

fix(*): Fix ReportValidity/CheckValidity return types.#268
dkamburov wants to merge 1 commit into
masterfrom
dkamburov/fix-38495

Conversation

@dkamburov

Copy link
Copy Markdown
Contributor

Description

Motivation / Context

Copy of https://github.com/Infragistics-Developer-Tools/dev-tools/pull/2129

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • .NET version:
  • Hosting model:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code
  • This PR includes API docs for newly added methods/properties
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Closes #

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates several Ignite UI Blazor component wrappers so their ReportValidity*/CheckValidity* methods return the boolean result produced by the underlying DOM reportValidity() / checkValidity() calls, instead of returning void/Task.

Changes:

  • Updated ReportValidityAsync/ReportValidity to return Task<bool> / bool for multiple components and convert the JS return value via ReturnToBoolean.
  • Updated CheckValidityAsync/CheckValidity to return Task<bool> / bool for multiple components and convert the JS return value via ReturnToBoolean.
  • Aligned the Select wrapper’s CheckValidity* methods with the same boolean-return pattern already used for ReportValidity*.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/components/Blazor/Textarea.cs Return bool/Task from reportValidity and checkValidity interop calls.
src/components/Blazor/Slider.cs Return bool/Task from reportValidity and checkValidity interop calls.
src/components/Blazor/Select.cs Return bool/Task from checkValidity interop calls.
src/components/Blazor/Rating.cs Return bool/Task from reportValidity and checkValidity interop calls.
src/components/Blazor/InputBase.cs Return bool/Task from reportValidity and checkValidity interop calls.
src/components/Blazor/DateRangePicker.cs Return bool/Task from reportValidity and checkValidity interop calls.
src/components/Blazor/DatePicker.cs Return bool/Task from reportValidity and checkValidity interop calls.
src/components/Blazor/Combo.cs Return bool/Task from reportValidity and checkValidity interop calls.
src/components/Blazor/CheckboxBase.cs Return bool/Task from reportValidity and checkValidity interop calls.

Comment on lines +227 to +235
public async Task<bool> ReportValidityAsync()
{
await InvokeMethod("reportValidity", new object[] { }, new string[] { });
var iv = await InvokeMethod("reportValidity", new object[] { }, new string[] { });
return ReturnToBoolean(iv);
}
public void ReportValidity()
public bool ReportValidity()
{
InvokeMethodSync("reportValidity", new object[] { }, new string[] { });
var iv = InvokeMethodSync("reportValidity", new object[] { }, new string[] { });
return ReturnToBoolean(iv);
Comment on lines +240 to +248
public async Task<bool> CheckValidityAsync()
{
await InvokeMethod("checkValidity", new object[] { }, new string[] { });
var iv = await InvokeMethod("checkValidity", new object[] { }, new string[] { });
return ReturnToBoolean(iv);
}
public void CheckValidity()
public bool CheckValidity()
{
InvokeMethodSync("checkValidity", new object[] { }, new string[] { });
var iv = InvokeMethodSync("checkValidity", new object[] { }, new string[] { });
return ReturnToBoolean(iv);
@MayaKirova

Copy link
Copy Markdown
Contributor

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

Successfully merging this pull request may close these issues.

3 participants