Coder Social home page Coder Social logo

Comments (9)

shahabganji avatar shahabganji commented on May 18, 2024 2

@ghiscoding

Your welcome comrade. so I close the issue and will publish an npm package as soon as you confirm. if you find any problem do not hesitate to reopen the issue.

from aurelia-toolbelt.

ghiscoding avatar ghiscoding commented on May 18, 2024 1

@shahabganji
As promised, I took a bigger look at the documentation that you provided and everything looks good, I see you added even more than I expected. All the binding that you added make this Radio Button component as something that I can't wait to use. I'll patiently wait for your new release and in the mean time, I'll up vote ⭐️

Thanks for the amazing support

from aurelia-toolbelt.

shahabganji avatar shahabganji commented on May 18, 2024 1

@ghiscoding

I published v1.0.0 npm package. It is worth knowing that there is a nuget package for .NET developers here, if your are nice to know about.

from aurelia-toolbelt.

ghiscoding avatar ghiscoding commented on May 18, 2024

To answer your question, I would go with something similar to what was implemented in Aurelia-Bootstrap. I could use his lib, but there's no update since a year and so I don't think they support Bootstrap 4 very well. So I would prefer to use your library :)

Here's the code for the other lib that I reference, here's the Button as Radio and also a separate file for Button as Checkbox

Also if that helps in anything, I also have an open source library for Aurelia-Bootstrap-Select which when an array of object is passed, I can bind the model.bind to the object selected (from the array) and the value.bind which is the value (typically a string). I like this approach since I sometime want just the string, while in other cases I want the entire object selected to get his id, value and other properties. For that behavior, I use the valueChanged and/or modelChanged to populate both value.bind and model.bind

from aurelia-toolbelt.

shahabganji avatar shahabganji commented on May 18, 2024

@ghiscoding

Also if that helps in anything, I also have an open source library for Aurelia-Bootstrap-Select which

There is a dropdown component available in the toolbelt, albeit your select has more features than the bootstrap itself, BTW, I didn't get your point about Aurelia-Bootstrap-Select.

Here's the code for the other lib that I reference, here's the Button as Radio and also a separate file for Button as Checkbox

As far as I understand they are custom attributes and not components, however, I'll deep dive into the codes you mentioned and try to add your required(missed) feature into the toolbelt.

from aurelia-toolbelt.

ghiscoding avatar ghiscoding commented on May 18, 2024

@shahabganji
The Aurelia-Bootstrap-Select example was to show that I've implemented both the value.bind (which in the example below returns the id) and the model.bind (which below has the complete object selected). The reason I like this approach is that sometime I just want the id (or the string) and other times I want the entire object since I might use other properties of the object.

On the sample page of Aurelia-Bootstrap-Select, I show both the value and model (item), see them below where the red arrows are pointing to.

bootstrap-select

Also, Aurelia itself use the same technique with radio buttons (which is what I'm using for now until your component is fixed). See their explanation on the Aurelia docs

from aurelia-toolbelt.

shahabganji avatar shahabganji commented on May 18, 2024

@ghiscoding

Thanks for your guidance, actually we have such implementations for toggle and undocumented controls like checkboxes & radio buttons , the source code is here, might be useful for your project too.

On the sample page of Aurelia-Bootstrap-Select, I show both the value and model (item), see them below where the red arrows are pointing to.

We have the same approach on the dropdown component.

if you are intereseted we have a bunch of undocumented components here, worth looking at, should you require any further information or suggestions about those controls please do not hesitate to contact me.

from aurelia-toolbelt.

shahabganji avatar shahabganji commented on May 18, 2024

@ghiscoding

I didn't add value and model bindings to the button groups, however, since these buttons that we are talking about are meant to be radio buttons or checkboxes I take a similar approach as it is in checkbox binding and radio bindings in Aurelia docs.

Take a look at new abt-checkbox-button and abt-radio-button and let me know what you think of them.

from aurelia-toolbelt.

ghiscoding avatar ghiscoding commented on May 18, 2024

@shahabganji
Sweet, this looks exactly what I wanted to have. I'll give it a try later tonight. Thanks a lot

from aurelia-toolbelt.

Related Issues (20)

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.