dotnet-smartcomponents / smartcomponents

Experimental, end-to-end AI features for .NET apps
622 stars 54 forks source link

Fluent UI Blazor #30

Open mortenfa opened 3 months ago

mortenfa commented 3 months ago

What a great idea! Thumbs up to this. :)

I've already tried it out with success (primarily SmartPaste) in different scenarios (Blazor, MVC,) but I'm stuck in Blazor when using Fluent UI (.Net 8). It would be great if it was possible to override the submit event of the Smart Paste button so I could manipulate the payload data before posting. Just a thought.

Thanks!

SteveSandersonMS commented 3 months ago

It would be great if it was possible to override the submit event of the Smart Paste button so I could manipulate the payload data before posting.

Can you provide an example of how you'd want the API to look? I'm unusure in what way you'd want to "manipulate the payload data". Thanks!

mortenfa commented 3 months ago

Some ideas, I didn't mean to intercept the pasted data, but more in the likes of adding configuration options to the button:

In Blazor Fluent UI, the components wraps a corresponding element with a "current-value" property for example

`

` The "traditional" Form controls (Text field, radio, checkbox and textarea) have a Name attribute where as the combobox, select, autocomplete and more are implemented as components without the Name attribute - but there is a Title (aria-title) So if the component could search for these as well and insert the results in the current-value property I suppose it would work. Never the less it could be nice with a config object setting the elements to look for. var config = [ { Type = "' tag with the aria-title 'Select1' (or name attribute if it's a text field / textarea) and set the value in the "current-value" property
wisamidris7 commented 1 month ago

you can make your own aspnetcomponents library with using fluent js it could work