ember-headless-form icon indicating copy to clipboard operation
ember-headless-form copied to clipboard

feature add a field.CheckboxGroup

Open basz opened this issue 1 year ago • 1 comments

Similar as field.RadioGroup but then for checkboxes.

Obviously would return an array of checked values

<form.Field @name="callBeBackAt" as |field|>
    <field.CheckboxGroup class="my-2 flex flex-col" as |group|>
        <group.Label>Call me back at/group.Label>
        <div class="flex flex-row space-x-2">
            <group.Checkbox @value="morning" as |checkbox|>
                <checkbox.Input />
                <checkbox.Label>Morning</checkbox.Label>
            </group.Checkbox>
            <group.Checkbox @value="afternoon" as |checkbox|>
                <checkbox.Input />
                <checkbox.Label>Afternoon</checkbox.Label>
            </group.Checkbox>
            <group.Checkbox @value="evening" as |checkbox|>
                <checkbox.Input />
                <checkbox.Label>Evenings</checkbox.Label>
            </group.Checkbox>
        </div>
    </field.CheckboxGroup>
</form.Field>

Interest in this?

basz avatar Jul 11 '24 11:07 basz

Yeah, absolutely. I don't think I have the time to do this, but a PR would certainly be welcome! :)

simonihmig avatar Jul 17 '24 08:07 simonihmig

attempting => stuck :-)

clone
pnpm i
pnpm start

error

idea? (macos, node v20+)

basz avatar Aug 17 '24 08:08 basz

Hi @simonihmig have some spare time to look at the PR i did? Thanks!

basz avatar Sep 18 '24 08:09 basz