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 #993 Support checkboxes block element in input block for TypeScript users. #994

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export interface SectionBlock extends Block {
type: 'section';
text?: PlainTextElement | MrkdwnElement; // either this or fields must be defined
fields?: (PlainTextElement | MrkdwnElement)[]; // either this or text must be defined
accessory?: Button | Overflow | Datepicker | Select | MultiSelect | Action | ImageElement | RadioButtons;
accessory?: Button | Overflow | Datepicker | Select | MultiSelect | Action | ImageElement | RadioButtons | Checkboxes;
Copy link
Member

Choose a reason for hiding this comment

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

Just for future reference: A checkboxes element in a section block is not allowed in messages. That said, considering the lack of ways to distinguish if the container of blocks is either a message or a view, I think there is no better way than just adding Checkboxes type for modals and Home tabs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A checkboxes element in a section block is not allowed in messages.

@seratch Ah, right. But, yeah, I also think that it would be better to choose a benefit to add Checkboxes type for both modal and home tab at this time.

}

export interface FileBlock extends Block {
Expand All @@ -289,7 +289,7 @@ export interface InputBlock extends Block {
label: PlainTextElement;
hint?: PlainTextElement;
optional?: boolean;
element: Select | MultiSelect | Datepicker | PlainTextInput | RadioButtons;
element: Select | MultiSelect | Datepicker | PlainTextInput | RadioButtons | Checkboxes;
}

export interface MessageAttachment {
Expand Down