-
Notifications
You must be signed in to change notification settings - Fork 66
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
Conversation
<div css={styles.actions}> | ||
<Controller | ||
control={form.control} | ||
name={`plans.${index}.is_enabled`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name={`plans.${index}.is_enabled`} | |
name={`plans.${index}.is_enabled` as 'plans.0.is_enabled'} |
<div ref={setNodeRef} style={style} css={styles.wrapper}> | ||
<button type="button" {...attributes} {...listeners} css={styles.dragButton} data-drag-button> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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.
No description provided.