class documentation
Represents a button in a View
that opens up an interactive modal.
Examples:
import fiftyone.operators.types as types schema = { "modal": {"icon": "local_offer", "iconVariant": "outlined", "title": "Modal Title", "subtitle": "Modal Subtitle", "body": "Modal Body", textAlign: {title: "center", subtitle: "left", body: "right"}}, "primaryButton": {"primaryText": "This is the primary button", "primaryColor": "primary", "params": {"foo": "bar", "multiple": True}}, "secondaryButton": {"secondaryText": "This is the secondary button", "secondaryColor": "secondary"}, "primaryCallback": self.do_something(), "secondaryCallback": self.do_nothing(), "functionality": "tagging", } modal = types.ModalView(**schema, label="This is a modal", variant="outlined", icon="local_offer") .. note:: The primary callback is called when the primary button is clicked and the secondary callback is called when the secondary button is clicked. Secondary callback defaults to a closure of the modal unless defined. Buttons of ModalView inherit all functionality of ButtonView. inputs = types.Object() inputs.view("modal_btn", modal)
Parameters | |
modal | the textual content of the modal |
primary | the properties of the primary button |
secondary | the properties of the secondary button |
primary | the function to execute when the primary button is clicked |
secondary | the function to execute when the secondary button is clicked |
functionality | the name of the functionality to execute when the primary button is clicked. Available options are 'tagging' |
Method | __init__ |
Undocumented |
Inherited from Button
:
Method | to |
Undocumented |
Instance Variable | href |
Undocumented |
Instance Variable | operator |
Undocumented |
Instance Variable | params |
Undocumented |
Instance Variable | prompt |
Undocumented |
Inherited from View
(via Button
):
Method | clone |
Undocumented |
Method | kwargs |
Undocumented |
Instance Variable | component |
Undocumented |
Instance Variable | components |
Undocumented |
Instance Variable | container |
Undocumented |
Instance Variable | placeholder |
Undocumented |
Instance Variable | read |
Undocumented |
Instance Variable | space |
Undocumented |
Instance Variable | _kwargs |
Undocumented |