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

Added the ability to hide the Delete option in the Attachments component #1150

Conversation

anil-anand
Copy link
Contributor

@anil-anand anil-anand commented Jun 24, 2024

Description

Checklist

  • I have made corresponding changes to the documentation.
  • I have updated the types definition of modified exports.
  • I have verified the functionality in some of the neeto web-apps.
  • I have added the necessary label (patch/minor/major - If package publish
    is required).

Reviewers

@anil-anand
Copy link
Contributor Author

@AbhayVAshokan _a
Please review.

@anil-anand anil-anand marked this pull request as ready for review June 24, 2024 11:05
Copy link
Member

@AbhayVAshokan AbhayVAshokan left a comment

Choose a reason for hiding this comment

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

@anil-anand _a can you also add the prop and the description in Storybook? You can edit the below file for the same:

export const ATTACHMENTS_TABLE_ROWS = [
["attachments", "An array of the metadata of all the attachments."],
[
"onChange",
"Callback function to be called when the attachments need to be updated as a result of CRUD operations.",
],
["endpoint", "Endpoint to upload attachments to."],
[
"isIndependent",
"The default 'Add attachments' button can be hidden by providing a falsy value.",
],
["dragDropRef", "Ref to the drag and drop wrapper component."],
[
"ref",
"Ref for the Attachments component. This ref needs to be used for accessing the handleUploadAttachment function.",
],
[
"disabled",
"If true, the options to download, rename and delete the attachments will be disabled.",
],
[
"config",
"Object to customize Attachments component, It has 3 properties: allowedFileTypes, maxNumberOfFiles and maxFileSize.",
],
[
"showToastr",
"Boolean to show/hide toastr when an attachment is deleted/renamed, default value is true.",
],
];

Please merge it yourself once done.

@neetogit-bot neetogit-bot bot assigned anil-anand and unassigned AbhayVAshokan Jun 24, 2024
@neetodeploy neetodeploy bot requested a deployment to neeto-editor-ou1t-pr-1150 June 24, 2024 17:59 In progress
@anil-anand anil-anand merged commit 88a188c into main Jun 24, 2024
@anil-anand anil-anand deleted the 1149-allow-hiding-the-delete-option-in-the-attachments-component branch June 24, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Releases small requests or bug fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow hiding the Delete option in the Attachments component
2 participants