Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover inside a Modal #826

Closed
artyorsh opened this issue Jan 15, 2020 · 1 comment
Closed

Popover inside a Modal #826

artyorsh opened this issue Jan 15, 2020 · 1 comment
Labels
🐛 Bug 📱 Components components module-specific

Comments

@artyorsh
Copy link
Collaborator

artyorsh commented Jan 15, 2020

🐛 Bug Report

Popover-based components like Autocomplete or Datepicker are not updated properly if placed in Modal. The content displayed in popover may be closed whenever user starts interacting with component.

Demo

To Reproduce

import React from 'react';
import { Button, Modal, Datepicker } from '@ui-kitten/components';

export const DatepickerInModal = () => {

  const [visible, setVisible] = React.useState(false);
  const [date, setDate] = React.useState(null);

  const toggleModal = (): void => {
    setVisible(!visible);
  };

  return (
    <React.Fragment>
      <Button onPress={toggleModal}>
        TOGGLE MODAL
      </Button>
      <Modal visible={visible} onBackdropPress={toggleModal}>
        <Datepicker date={date} onSelect={setDate} />
      </Modal>
    </React.Fragment>
  );
};

Steps to reproduce the behavior:

Expected behavior

Popover-based components should be updated properly not depending on where it was rendered.

Link to runnable example or repository (highly encouraged)

UI Kitten and Eva version

Package Version
@eva-design/eva any
@ui-kitten/components any

Environment information

react: ~16.9.0 => 16.9.0
react-native: ~0.61.4 => 0.61.5
@AnasAlamin
Copy link

did anyone figure out how to solve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug 📱 Components components module-specific
Projects
None yet
Development

No branches or pull requests

2 participants