Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tile-group): add name and required props #1818

Merged
merged 3 commits into from
Oct 3, 2023
Merged

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Oct 3, 2023

Similar to #1037, fixes TileGroup to forward name / required props to its group of inputs.

@@ -23,10 +26,16 @@
/** Specify a name attribute for the input */
export let name = "";
Copy link
Contributor

@brunnerh brunnerh Oct 3, 2023

Choose a reason for hiding this comment

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

Maybe also switch the name default to undefined so the attribute is not added without value.

Comment on lines +34 to +37
groupName: readonly(groupName),
groupRequired: readonly(groupRequired),
Copy link
Contributor

Choose a reason for hiding this comment

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

Stores do not appear to be defined yet; should be writable and updated reactively from props at the end of the <script> along the lines of:

$: $groupName = name;
$: $groupRequired = required;

@brunnerh
Copy link
Contributor

brunnerh commented Oct 3, 2023

Would obsolete #973 and address #972.

I removed name from the child component, but that is not really necessary.
Maybe then an explicit required should be added to RadioTile for consistency.

@@ -23,10 +26,16 @@
/** Specify a name attribute for the input */
export let name = "";

import { getContext } from "svelte";
import { getContext, readable } from "svelte";
Copy link
Contributor

Choose a reason for hiding this comment

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

That's from 'svelte/store'

@metonym metonym marked this pull request as ready for review October 3, 2023 18:02
@metonym metonym merged commit 836b360 into master Oct 3, 2023
2 checks passed
@metonym metonym deleted the fix-tile-group branch October 3, 2023 18:20
@metonym
Copy link
Collaborator Author

metonym commented Oct 13, 2023

Released in v0.81.0

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.

None yet

2 participants