Giter Club home page Giter Club logo

havit.blazor's Introduction

HAVIT Blazor - Bootstrap 5 component bundle

GitHub Repo NuGet Version Release Notes NuGet Downloads GitHub License GitHub Stars
Build Status #StandWithUkraine

  • Free Bootstrap 5.3 components for ASP.NET Blazor
  • .NET 6+ with Blazor WebAssembly or Blazor Server (other hosting models not tested yet, .NET 7 fully supported)
  • Enterprise project template (optional) - layered architecture, EF Core, gRPC code-first, ...

If you enjoy using HAVIT Blazor, you can become a sponsor. Your sponsorship will allow us to devote time to features and issues requested by the community (i.e. not required by our own projects) ❤️.

Components

Forms

Buttons & Indicators

Data & Grid

Layout & Typography

Navigation

Modals & Interactions

Special

havit.blazor's People

Contributors

alexax578 avatar blanchardglen avatar blanchg avatar cincuranet avatar crdo avatar cryptkat avatar dependabot[bot] avatar enchantedcoder avatar hakenr avatar harvey1214 avatar honzazajic298 avatar jirikanda avatar josethechamp avatar leonardopugliese avatar linjianlin avatar matoushruby avatar mirol-h avatar robertmclaws avatar rqx110 avatar sshulik avatar tommi1hirvonen avatar tpivan avatar xopabyteh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

havit.blazor's Issues

Problem with HxInputFile

Hi. Thanks for the great work! The HxInputFile works great when I'm uploading files from the same machine where the site is hosted, but refuses to work when I initiate upload from another PC. I get preflight timeouts in chrome developer console. I suppose that it has something to do with CORS as my UploadUrl is on another port (and will be on another IP in the future), but I set my API to enable requests from any origin. Did you test you component in such a scenario?

HxDropdownToggleElement is missing [Parameter] on the EventCallbacks

HxDropdownToggleButton has [Parameter] on the OnShown and OnHidden EventCallbacks, but the attribute is missing from them on HxDropdownToggleElement. I'm guessing this is just an oversight not on purpose? It makes it impossible to assign the event handlers in the markup. (I'm assigning them in code at the moment as a workaround, but thats rather messy)

[HxPopover] Cannot read properties of null (reading 'removeEventListener') when leaving page early

When leaving the page before the popover gets fully initialized:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Cannot read properties of null (reading 'removeEventListener')
      TypeError: Cannot read properties of null (reading 'removeEventListener')
          at destroy (https://localhost:44381/_content/Havit.Blazor.Components.Web.Bootstrap/HxPopover.js:29:10)
          at Module.createOrUpdate (https://localhost:44381/_content/Havit.Blazor.Components.Web.Bootstrap/HxPopover.js:3:2)
          at https://localhost:44381/_framework/blazor.webassembly.js:1:3942
          at new Promise (<anonymous>)
          at Object.beginInvokeJSFromDotNet (https://localhost:44381/_framework/blazor.webassembly.js:1:3908)
          at Object.w [as invokeJSFromDotNet] (https://localhost:44381/_framework/blazor.webassembly.js:1:64232)
          at _mono_wasm_invoke_js_blazor (https://localhost:44381/_framework/dotnet.5.0.12.js:1:190800)
          at do_icall (wasm://wasm/00aba242:wasm-function[10596]:0x194e4e)
          at do_icall_wrapper (wasm://wasm/00aba242:wasm-function[3305]:0x79df9)
          at interp_exec_method (wasm://wasm/00aba242:wasm-function[2155]:0x44ad3)
Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'removeEventListener')
TypeError: Cannot read properties of null (reading 'removeEventListener')
    at destroy (https://localhost:44381/_content/Havit.Blazor.Components.Web.Bootstrap/HxPopover.js:29:10)
    at Module.createOrUpdate (https://localhost:44381/_content/Havit.Blazor.Components.Web.Bootstrap/HxPopover.js:3:2)
    at https://localhost:44381/_framework/blazor.webassembly.js:1:3942
    at new Promise (<anonymous>)
    at Object.beginInvokeJSFromDotNet (https://localhost:44381/_framework/blazor.webassembly.js:1:3908)
    at Object.w [as invokeJSFromDotNet] (https://localhost:44381/_framework/blazor.webassembly.js:1:64232)
    at _mono_wasm_invoke_js_blazor (https://localhost:44381/_framework/dotnet.5.0.12.js:1:190800)
    at do_icall (wasm://wasm/00aba242:wasm-function[10596]:0x194e4e)
    at do_icall_wrapper (wasm://wasm/00aba242:wasm-function[3305]:0x79df9)
    at interp_exec_method (wasm://wasm/00aba242:wasm-function[2155]:0x44ad3)
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__15`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
   at Havit.Blazor.Components.Web.Bootstrap.Internal.HxTooltipInternalBase.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

We need to make the JS test for popover instance existence.

[HxPager] Overflowing on mobile devices

image

As the TableContainerCssClass only wraps the table itself, there is potential issue with HxPager overflowing on mobile devices if the number of pages is high even though the table-responsive class is used.

[HxButton] Cannot specify HxTooltip span CSS classes

I have a button group I'm implementing where I need to be able to set the padding on the button content. However, when a Tooltip is specified, the HxButton.CssClass is not set on the <span /> used to contain the tooltip, so it renders incorrectly.

image
The one on the top is the proper rendering, using the original controls I'm replacing. the one on the bottom is with HxButtons. The first button does not have a tooltip specified, whereas the other 2 do. So px-2 is set on the <button />. not the <span /> that contains it.

[HxCarousel] System.ObjectDisposedException: ObjectDisposed_Generic

blazor.webassembly.js:1 
        
       crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: ObjectDisposed_Generic
      ObjectDisposed_ObjectName_Name, DotNetObjectReference`1
System.ObjectDisposedException: ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, DotNetObjectReference`1
   at Microsoft.JSInterop.DotNetObjectReference`1[[Havit.Blazor.Components.Web.Bootstrap.HxCollapse, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]].ThrowIfDisposed()
   at Microsoft.JSInterop.JSRuntime.TrackObjectReference[HxCollapse](DotNetObjectReference`1 dotNetObjectReference)
   at Microsoft.JSInterop.Infrastructure.DotNetObjectReferenceJsonConverter`1[[Havit.Blazor.Components.Web.Bootstrap.HxCollapse, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]].Write(Utf8JsonWriter writer, DotNetObjectReference`1 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1[[Microsoft.JSInterop.DotNetObjectReference`1[[Havit.Blazor.Components.Web.Bootstrap.HxCollapse, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].TryWrite(Utf8JsonWriter writer, DotNetObjectReference`1& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[Microsoft.JSInterop.DotNetObjectReference`1[[Havit.Blazor.Components.Web.Bootstrap.HxCollapse, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].TryWriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter writer, Object& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.ArrayConverter`2[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnWriteResume(Utf8JsonWriter writer, Object[] value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnTryWrite(Utf8JsonWriter writer, Object[] value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter writer, Object[]& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].WriteCore(Utf8JsonWriter writer, Object[]& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[Object[]](JsonConverter jsonConverter, Utf8JsonWriter writer, Object[]& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[Object[]](Utf8JsonWriter writer, Object[]& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[Object[]](Object[]& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[Object[]](Object[] value, JsonSerializerOptions options)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[Object](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__15`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
   at Havit.Blazor.Components.Web.Bootstrap.HxCollapse.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

[HxInputNumber] Needs to limit inputs by range and numeric characters

Other Numeric Blazor controls (like Radzen's Numeric) allow for limiting the inputs by Min, Max, and alpha characters. I believe this control should behave in a similar manner.

For example, I was able to use the built-in support to get your control to render like this, but I cannot limit it to only positive integers without extra code.
image

Also, I can still use my desktop keyboard to type letters into the control, and it will accept them. I don't believe there is any reason why this control should accept alpha characters as input.

Thanks for building a great control kit!

Do we want hx-component-name classes for standard Bootstrap components? How to handle them in derived components?

For most HxComponents we add a .hx-component-name class to the root element.
Does that add any value?
How to handle this class for derived components?
e.g. HxButton => HxCollapseToggleButton, HxDropdownToggleButton, HxNavbarToggler, etc.

There should be some easy to understand rule we will be able to apply.

Proposal: Add .hx-class only for new components (.hx-grid, .hx-sidebar) and where needed for customization (.hx-offcanvas-footer).

Failed to build Havit.Blazor locally

I want to propose a few PRs with new components and improvements but can't build the Havit solution locally. My problems:

  1. During the build I get the next error:
    image

Looks like it's some CI artifacts, but I am pretty sure that it's shouldn't be in common code. Is it possible to move it to CI processes or provide a solution on how to disable it locally?

  1. Problem with BootstrapIcon. In remarks for I found the solution how to solve it:
	/// - Update wwwroot\fonts\bootstrap-icons.woff
	/// - Update wwwroot\fonts\bootstrap-icons.woff2
	/// - Update wwwroot\bootstrap-icons.css
	/// - Update bootstrap-icons.json in this folder.

but looks like it does not work for me. Is it possible to provide Powershell (and bash for macOS/Linux) to trigger update these files to automate regeneration of these properties?

Question:HxCarousel - do not stop

Is it possible to cycle througt slides in HxCarousel without stopping, when user points mouse on slide ?

I am trying to achieve, that Carrousel would be sliding all the time. User cannot stop it anyhow.
Is it possible ?

HxGrid - System Aggregate Exception

First of all I have you thank your team for such an incredible amount of work and excellent documentation! It really is superb!

I am currently using the HxGrid without it being wrapped in an "if data is not null" block because i loved the loading skeleton you guys provide. It currently shows the nice "loading" skeleton:
image
but i get an issue in the console:

Error: System.AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'source'))

---> System.ArgumentNullException: Value cannot be null. (Parameter 'source')

at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)

at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)

at Havit.Blazor.Components.Web.Bootstrap.HxGrid1.InvokeDataProviderInternal(GridDataProviderRequest1 request)

at Havit.Blazor.Components.Web.Bootstrap.HxGrid`1.RefreshPaginationDataCoreAsync(Boolean renderOnSuccess)

at Havit.Blazor.Components.Web.Bootstrap.HxGrid`1.OnAfterRenderAsync(Boolean firstRender)

--- End of inner exception stack trace ---

I am loading the data for the grid like this:

    protected override async Task OnInitializedAsync()
    {
        vm.data = await _ctx.GetTradeStatistics();
    }

Notes

  • If i wrap the razor grid in an "if data exists" block it works, but i miss out on your skeleton loading.
  • The data feeding this grid is a slow running query (approx 2 second average) and returns 700 rows if that helps solve it..

Unnecessary Downstream Dependencies

Installing Havit.Blazor.Components.Web.Bootstrap (should probably be named Havit.Web.Components.Bootstrap for consistency with Microsoft's namespacing, but that's another issue) takes a dependency on Havit.Core, which apparently brings with it the following:

image

Everything below that should be unnecessary, especially if it has "Windows" in the package name.

Thanks!

[HxCalendar] HxCalendar.Defaults.DateCustomizationProvider?

Should we allow application-wide customizations for HxCalendar?
There already are MinDate and MaxDate settings.
What if someone wants all weekends to be disabled in all calendars?
(Still for HxInputDate and HxInputDateRange by setting their Defaults.CalendarCustomizationProvider, same provider can be used for both. Currently not doable for all HxCalendar instances application-wide.)

cc @jirikanda

[HxMessageBox] Customization of buttons (Color, Outline, ...)

Idea

  1. ⚠️ Rename ButtonDefaults (currently used for HxButton.Defaults) to ButtonSettings (more generic name).
  2. Add HxMessageBox.Defaults.PrimaryButtonSettings and HxMessageBox.Defaults.OtherButtonsSettings.
  3. Eventually add IHxMessageBox.ShowAsync(), the MessageBoxRequest.PrimaryButtonSettings and MessageBoxRequest.OtherButtonsSettings to allow customization of the single MessageBox instance.

⚠️ Implies renaming all XyDefaults to XySettings to keep consistency.

PROS

  • This approach is applicable to other scenarios, such as HxListLayout.FilterButtonSettings

CONS

  • The XyDefaults currently do not cover all the parameters which needs to be configurable for specific scenarios, e.g. HxListLayout.FilterButtonSettings.Text | Icon | .... These does not make much sense for HxButton.Defaults.
  • This approach does not allow full customizability of the buttons. We cannot use HxButton-derived component here (e.g. BtButton).

NOT SURE

  • This approach kind of reintroduces idea of Skins as the new XySettings are usable this way.

Alternative approaches?

  • ???
  • how is this handled by other component bundles?

cc @jirikanda, @crdo for LDM

Blazor fails to load on your site with Edge

Any page I attempt to load on your site fails to load Blazor. Below is the error that I receive. I am not running any browser extensions and am using the default browser settings. This looks like a Blazor issue but I was curious if you've seen this before.

Error:

blazor.webassembly.js:1 
        
       Uncaught Error: This browser does not support WebAssembly.
    at blazor.webassembly.js:1
    at l (blazor.webassembly.js:1)
    at <anonymous>:1:20
    at blazor.webassembly.js:1
    at new Promise (<anonymous>)
    at Object.start (blazor.webassembly.js:1)
    at Object.<anonymous> (blazor.webassembly.js:1)
    at blazor.webassembly.js:1
    at Object.next (blazor.webassembly.js:1)
    at a (blazor.webassembly.js:1)

Windows 10
Microsoft Edge
Version 95.0.1011.1 (Official build) dev (64-bit)

image

Default margin-bottom for inputs in form?

Currently there is margin-bottom "for all inputs in form, if it is not the only child":

form .hx-form-group:not(:only-child),
form .hx-autosuggest:not(:only-child),
form .form-check:not(:only-child),
form .form-switch:not(:only-child),
form .hx-input-tags:not(:only-child) {
  margin-bottom: var(--hx-form-spacing);
}

...which is something we want for basic form layout, but might cause unexpected effects for forms+inputs used in navbars, dropdowns, standalone and such specific situations:
image

We might try to look for better CSS selector to limit the side-effects.

Reusing defaults in derived components

The Defaults system is ready to let the descendants decide whether

  1. to use ancestor defaults, or
  2. to define its own defaults, or
  3. not to use defaults at all.

For our own inherited components we have to decide which option makes sense (general rule should apply).

Current components:

HxButton.Defaults

  • HxDropdownToggle(Button) - should probably use HxButton.Defaults
  • HxCollapseToggleButton - should probably use HxButton.Defaults
  • HxNavbarToggler - probably should NOT use any configurable defaults?

HxInputText.Defaults

  • HxInputTextArea - ???

cc @crdo, @jirikanda

[HxModal] No ability to set your own sizes

I'm trying to re-create the modal on this page, and running into a problem: I'm not able to add my own class to the div.modal-dialog element to set the size (in this case, mw-900px, which is custom to this theme). I would assume the CssClass property would point to the div to control the dialog itself, but instead it points to the background container.

Suggested fix:

  • Rename the current CssClass property to BackgroundCssClass, so that the existing application to the div.modal.fade element is more intuitive.
  • Add a new CssClass property and adjust Line 7 to combine that class with the others.

If you are concerned about breaking people, you could add a ModalCssClass property instead and point IT at div.modal-dialog instead.

ValidationMessageMode - [HxValidationMessage] vs .invalid-tooltip

We should not stick with the .invalid-tooltip implementation of form validation messages.
The components should allow users to pick a way of validation message rendering, incl. the basic .is-invalid.

See https://getbootstrap.com/docs/5.1/forms/validation/ for Bootstrap validation variants.

REMEMBER: We want to avoid changing position of the form submit button to prevent the "no onclick/onsubmit issue when button position changes": http://jsfiddle.net/WV3Q8/3/

[HxButton] Automatic Spinner only works with Task methods

Hi,

The automated spinner currently only works if the invoked eventhandler is wrapped into a Task.Run call.
e.g.
<HxButton Text="Test" OnClick="@(async () => await Task.Run(() => DbContext.Database.EnsureCreated()))"/>
works, however
<HxButton Text="Test" OnClick="@(async () => await DbContext.Database.EnsureCreatedAsync())"/>
does not.

Is this a limitation?

Thanks

[HxDropdownToggleButton] ObjectDisposedException: Cannot access a disposed object. Object name: 'DotNetObjectReference`1'.

When leaving page too early you might get

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Cannot access a disposed object.
      Object name: 'DotNetObjectReference`1'.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'DotNetObjectReference`1'.
   at Microsoft.JSInterop.DotNetObjectReference`1[[Havit.Blazor.Components.Web.Bootstrap.HxDropdownToggleButton, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]].ThrowIfDisposed()
   at Microsoft.JSInterop.JSRuntime.TrackObjectReference[HxDropdownToggleButton](DotNetObjectReference`1 dotNetObjectReference)
   at Microsoft.JSInterop.Infrastructure.DotNetObjectReferenceJsonConverter`1[[Havit.Blazor.Components.Web.Bootstrap.HxDropdownToggleButton, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]].Write(Utf8JsonWriter writer, DotNetObjectReference`1 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1[[Microsoft.JSInterop.DotNetObjectReference`1[[Havit.Blazor.Components.Web.Bootstrap.HxDropdownToggleButton, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].TryWrite(Utf8JsonWriter writer, DotNetObjectReference`1& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[Microsoft.JSInterop.DotNetObjectReference`1[[Havit.Blazor.Components.Web.Bootstrap.HxDropdownToggleButton, Havit.Blazor.Components.Web.Bootstrap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].TryWriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter writer, Object& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.ArrayConverter`2[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnWriteResume(Utf8JsonWriter writer, Object[] value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnTryWrite(Utf8JsonWriter writer, Object[] value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter writer, Object[]& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1[[System.Object[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].WriteCore(Utf8JsonWriter writer, Object[]& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[Object[]](JsonConverter jsonConverter, Utf8JsonWriter writer, Object[]& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[Object[]](Utf8JsonWriter writer, Object[]& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[Object[]](Object[]& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[Object[]](Object[] value, JsonSerializerOptions options)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[Object](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__15`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
   at Havit.Blazor.Components.Web.Bootstrap.HxDropdownToggleButton.OnAfterRenderAsync(Boolean firstRender) in D:\Development\002.HFW-HavitBlazor\Havit.Blazor.Components.Web.Bootstrap\Dropdowns\HxDropdownToggleButton.cs:line 100
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

[HxTooltip] CssClass property missing

There is no way to control the rendering of a Tooltip, for example to change the mode from Light to Dark. In the documentation, this is controlled by the data-bs-custom-class attribute, but the HxTooltip control does not implement attribute splatting, so you cannot set this manually.

[HxDropdownToggle] Dynamic CssClass value leaves dropdown menu stuck in open state

Having the CssClass property for HxDropdownToggle change dynamically based on user interaction, for example, leaves an open dropdown menu stuck in an open state. It looks like the class attribute show is overwritten for the dropdown toggle whenever the CssClass value changes.

Here is a simple working example. Toggling the checkbox inside the dropdown menu leaves the dropdown stuck in an open state. The class attribute show is removed from the dropdown toggle whenever the IsBold property in this example is changed.

<HxDropdown AutoClose="DropdownAutoClose.Outside">
    <HxDropdownToggle Color="ThemeColor.Primary" CssClass="@(IsBold ? "fw-bold" : null)">Show dropdown</HxDropdownToggle>
    <HxDropdownContent>
        <div class="row m-3" style="min-width: 100px;">
            <div class="col">
                <div>
                    <HxInputCheckbox @bind-Value="IsBold" Label="Toggle button text bold" />
                </div>
            </div>
        </div>
    </HxDropdownContent>
</HxDropdown>

@code {
    private bool IsBold { get; set; } = false;
}

It looks like the CoreCssClass property in HxDropdownToggle.cs doesn't take into account whether the dropdown is being shown or not. I guess this might the underlying reason.

protected override string CoreCssClass =>
	CssClassHelper.Combine(
		base.CoreCssClass,
		"dropdown-toggle",
		(DropdownContainer?.Split ?? false) ? "dropdown-toggle-split" : null,
		(NavContainer is not null) ? "nav-link" : null);

[HxCheckboxList] Inline checkboxes

Currently the HxCheckboxList doesn't support inline checkboxes as given in the bootstrap documentation here, and there is no option to set the CssClass of the individual HxInputCheckbox items.
Please add a property to select the layout, or the ability to set the CssClass of the individual checkboxes.
The same might exist on HxRadioButtonList too.

Export HxGrid Data

I need to export data table to pdf and xlsx format , is there any script or extension to support that. Thank you so much for your supports

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.