Args: *arg_blocks: Page to add to report blocks: Allows providing the report blocks as a single list type: An instance of SelectType that indicates if the select should use tabs or a dropdown (default: Tabs) name: A unique id for the blocks to
(
self,
*arg_blocks: BlockOrPrimitive,
blocks: t.List[BlockOrPrimitive] = None,
type: SelectType = SelectType.TABS,
name: BlockId = None,
label: str = None,
)
| 126 | report_minimum_blocks = 2 |
| 127 | |
| 128 | def __init__( |
| 129 | self, |
| 130 | *arg_blocks: BlockOrPrimitive, |
| 131 | blocks: t.List[BlockOrPrimitive] = None, |
| 132 | type: SelectType = SelectType.TABS, |
| 133 | name: BlockId = None, |
| 134 | label: str = None, |
| 135 | ): |
| 136 | """ |
| 137 | Args: |
| 138 | *arg_blocks: Page to add to report |
| 139 | blocks: Allows providing the report blocks as a single list |
| 140 | type: An instance of SelectType that indicates if the select should use tabs or a dropdown (default: Tabs) |
| 141 | name: A unique id for the blocks to aid querying (optional) |
| 142 | label: A label used when displaying the block (optional) |
| 143 | |
| 144 | !!! tip |
| 145 | Select can be passed using either arg parameters or the `blocks` kwarg, e.g. `dp.Select(table, plot, type=dp.SelectType.TABS)` or `dp.Select(blocks=[table, plot])` |
| 146 | """ |
| 147 | super().__init__(*arg_blocks, blocks=blocks, name=name, label=label, type=type) |
| 148 | if len(self.blocks) < 2: |
| 149 | log.info("Creating a Select with less than 2 objects") |
| 150 | |
| 151 | |
| 152 | class Group(ContainerBlock): |