Skip to content
Discussion options

You must be logged in to vote

Hi there!

Here are 2 modifications that you need to make:

  1. First off, your Poll component must be inserted into the React tree above the Controller module
addParent(MODULE_CONTROLLER, createModule("poll", PollComponent));
  1. You need to wrap the children with an extra <div> wrapper since yarl_container uses absolute positioning
<div style={{ flex: 1, position: "relative" }}>{children}</div>

And to make this solution compatible with #225, you can use the following conditional logic:

export default function Poll({ contains, addParent }: PluginProps) {
  addParent(
    contains(PLUGIN_THUMBNAILS) ? PLUGIN_THUMBNAILS : MODULE_CONTROLLER,
    createModule("poll", PollComponent),
  );
}

Live d…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MennatAllahMagdy
Comment options

@igordanchenko
Comment options

@MennatAllahMagdy
Comment options

Answer selected by MennatAllahMagdy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants