score:1

the outer <div> of your component has its own onclick handler which is setting the value of your state back to false. try using stoppropagation() on the inner onclick handled event. that will prevent the event from propagating to the outer parent <div>, and only the inner onclick handler will execute when it is clicked on.

{
  !this.state.selected || !this.actions.length ? null : (
    <div
      style={{
        position: "absolute",
        bottom: "0"
      }}
    >
      {this.actions.map((action, index) => (
        <div
          onclick={e => {
            e.stoppropagation();
            this.setstate({ selected: false });
          }}
          key={index}
        >
          <itemactionicon {...action} />
        </div>
      ))}
    </div>
  );
}

Related Query

More Query from same tag