Module: Slack::BlockKit::Layout::Section::MultiSelectElements

Included in:
Slack::BlockKit::Layout::Section
Defined in:
lib/slack/block_kit/layout/section/multi_select_elements.rb

Overview

Helper methods for Multi Select to inject to section

Instance Method Summary collapse

Instance Method Details

#multi_channels_select(placeholder:, action_id:, initial: nil, emoji: nil, max_selected_items: nil) {|element| ... } ⇒ Object

Yields:

  • (element)


9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/slack/block_kit/layout/section/multi_select_elements.rb', line 9

def multi_channels_select(placeholder:, action_id:,
                          initial: nil, emoji: nil, max_selected_items: nil)
  element = Element::MultiChannelsSelect.new(
    placeholder: placeholder,
    action_id: action_id,
    initial: initial,
    emoji: emoji,
    max_selected_items: max_selected_items
  )

  yield(element) if block_given?

  accessorise(element)
end

#multi_conversations_select(placeholder:, action_id:, initial: nil, emoji: nil, max_selected_items: nil, default_to_current_conversation: nil) {|element| ... } ⇒ Object

Yields:

  • (element)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/slack/block_kit/layout/section/multi_select_elements.rb', line 24

def multi_conversations_select(placeholder:, action_id:,
                               initial: nil, emoji: nil, max_selected_items: nil,
                               default_to_current_conversation: nil)
  element = Element::MultiConversationsSelect.new(
    placeholder: placeholder,
    action_id: action_id,
    initial: initial,
    emoji: emoji,
    max_selected_items: max_selected_items,
    default_to_current_conversation: default_to_current_conversation
  )

  yield(element) if block_given?

  accessorise(element)
end

#multi_external_select(placeholder:, action_id:, initial: nil, min_query_length: nil, emoji: nil, max_selected_items: nil) {|element| ... } ⇒ Object

Yields:

  • (element)


41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/slack/block_kit/layout/section/multi_select_elements.rb', line 41

def multi_external_select(placeholder:, action_id:,
                          initial: nil,
                          min_query_length: nil,
                          emoji: nil,
                          max_selected_items: nil)
  element = Element::MultiExternalSelect.new(
    placeholder: placeholder,
    action_id: action_id,
    initial: initial,
    min_query_length: min_query_length,
    emoji: emoji,
    max_selected_items: max_selected_items
  )

  yield(element) if block_given?

  accessorise(element)
end

#multi_static_select(placeholder:, action_id:, emoji: nil, max_selected_items: nil) {|element| ... } ⇒ Object

Yields:

  • (element)


60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/slack/block_kit/layout/section/multi_select_elements.rb', line 60

def multi_static_select(placeholder:, action_id:,
                        emoji: nil, max_selected_items: nil)
  element = Element::MultiStaticSelect.new(
    placeholder: placeholder,
    action_id: action_id,
    emoji: emoji,
    max_selected_items: max_selected_items
  )

  yield(element) if block_given?

  accessorise(element)
end

#multi_users_select(placeholder:, action_id:, initial: nil, emoji: nil, max_selected_items: nil) {|element| ... } ⇒ Object

Yields:

  • (element)


74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/slack/block_kit/layout/section/multi_select_elements.rb', line 74

def multi_users_select(placeholder:, action_id:,
                       initial: nil,
                       emoji: nil,
                       max_selected_items: nil)
  element = Element::MultiUsersSelect.new(
    placeholder: placeholder,
    action_id: action_id,
    emoji: emoji,
    initial: initial,
    max_selected_items: max_selected_items
  )

  yield(element) if block_given?

  accessorise(element)
end