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

Membership Frontend: Modals, Features, and API Integrations #1494

Merged
merged 20 commits into from
Jan 1, 2025

Conversation

sazedul-haque
Copy link
Collaborator

No description provided.

<div css={styles.actions}>
<Controller
control={form.control}
name={`plans.${index}.is_enabled`}
Copy link
Collaborator

@b-l-i-n-d b-l-i-n-d Dec 31, 2024

Choose a reason for hiding this comment

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

Suggested change
name={`plans.${index}.is_enabled`}
name={`plans.${index}.is_enabled` as 'plans.0.is_enabled'}

Comment on lines +70 to +71
<div ref={setNodeRef} style={style} css={styles.wrapper}>
<button type="button" {...attributes} {...listeners} css={styles.dragButton} data-drag-button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

As attributes are used to add a11y. It should be used in the outermost div to represent the whole element.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is their documentation says. As the whole element is not draggable and we have a specific button for that, we should attach these attribute to the button.

The useDraggable hook provides a set of sensible default attributes for draggable items. We recommend you attach these to the HTML element you are attaching the draggable listeners to.

type: 'bundles' | 'courses';
}

const CourseListTable = ({ type, form }: CourseListTableProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Without passing form, we can pass onAdd callback function to move the control outside.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now let's keep it this way.

form: UseFormReturn<any>;
}

const CategoryListTable = ({ form }: CategoryListTableProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Without passing form, we can pass callback functions like onAdd to move the control outside.

@sazedul-haque sazedul-haque merged commit 7f65149 into dev Jan 1, 2025
1 check passed
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.

2 participants