react-bootstrap

Modal not showing up in react with react-bootstrap

天涯浪子 提交于 2020-06-01 04:44:47
问题 I am trying to create a modal to have a login/register pop-up when clicking on the NavBar.Item Login/Register. My modal is defined as below: import React from "react"; import '../assets/styles/GenericTheme.css' import { Modal } from "react-bootstrap"; class LoginRegisterModal extends React.Component { constructor(props, context) { super(props); this.state = {show: false}; } open = () => { this.setState({show: true}); } close = () => { this.setState({show: false}); } render() { return ( //

React-Bootstrap Multiple Modal

雨燕双飞 提交于 2020-05-29 04:46:05
问题 I am using React-bootstrap in my project. I need to open multiple dialog. Is there any way to achieve this? Note: There is answers for bootstrap here but it does not work in react-bootstrap. Thanks. 回答1: we just handled multiple modals by having each pass in a different id and then setting the 'show' state to that: https://github.com/AgileVentures/agile-ventures-website-react-front-end/blob/4_homepage_changes_mob/src/App.js#L26 class App extends Component { constructor(props, context) { super

How to add padding/margin in React-Bootstrap

自古美人都是妖i 提交于 2020-05-13 19:27:13
问题 The bounty expires in 3 days . Answers to this question are eligible for a +50 reputation bounty. Sam wants to draw more attention to this question. I try to apply margins and paddings with React-Bootstrap as props. I passed the docs through but havent found any mention about adding padding or margin in there as it is in official bootstrap docs (3th and 4th). I know it doesnt support well Bootstrap 4, so tried with both. I tried to pass params as p={1} , paddingxs={5} or mt='1' but it doesnt

How to add a classname/id to React-Bootstrap Component?

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-11 04:08:05
问题 Suppose we are using Row from React-Bootstrap... How do we style it without using a wrapper or inner element: <Row> <div className='some-style'> ... </Row> Ideally we could just do: <Row className='some-style> ... </Row> But this doesn't work and I'd presume it's because React-Bootstrap does not know where the className goes within the Row component (it should just style the div that has the row's styles I think) 回答1: If you look at the code for the component you can see that it uses the

React bootstrap dropdown compatibility with webpack and babel

删除回忆录丶 提交于 2020-04-30 11:42:07
问题 i was using react-bootstrap components without any problem before adding webpack to my react project, now i am experiencing some weird things. Navbar Component: import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import {Dropdown, DropdownButton} from 'react-bootstrap'; class Navbar extends Component { constructor(props) { super(props); this.state = {}; } toggleOffcanvas() { document.querySelector('.sidebar-offcanvas').classList.toggle('active'); }

React-bootstrap/NavDropdown is hiding under the things below menubar (overlaping)

廉价感情. 提交于 2020-04-30 06:30:52
问题 NavDropdown is hiding under the things which contain the slider and body or below the menubar. I tried z-index: lower/higher number than mycontainer and drop-top ClassName. Even this dropdown does not come on top but it working in the responsive mobile screen test (in dev tool) style.css .drop-top { z-index: 1000; display: block; position: static; width: 100%; color: #61dafb; position: sticky; top: 0; } .mycontainer{ z-index: 101; margin-right: auto; margin-left: auto; display: block; } .tata

React-bootstrap/NavDropdown is hiding under the things below menubar (overlaping)

陌路散爱 提交于 2020-04-30 06:29:00
问题 NavDropdown is hiding under the things which contain the slider and body or below the menubar. I tried z-index: lower/higher number than mycontainer and drop-top ClassName. Even this dropdown does not come on top but it working in the responsive mobile screen test (in dev tool) style.css .drop-top { z-index: 1000; display: block; position: static; width: 100%; color: #61dafb; position: sticky; top: 0; } .mycontainer{ z-index: 101; margin-right: auto; margin-left: auto; display: block; } .tata

How to update data for table column in react?

微笑、不失礼 提交于 2020-04-18 05:35:16
问题 Hi i have problem with my table in bootstrap. I am getting data from server about timetable. This data i am saving in state. Next i am creating table. (Two ways of creating mobile and pc, just changing position of days and hours). Every column contains component SubjectColumn (there will be more data in one column like class and subject name). So when I click on this subject column i need to open modal with clicked subject data and after choosing of list of subjects in modal, I have to change

Adding custom css to React-Bootstrap Component

让人想犯罪 __ 提交于 2020-04-17 22:42:15
问题 How to add some custom CSS styles to the Nav component to manage the padding between the nav items and make it float right of the page? const navbar = props => ( <Navbar collapseOnSelect expand="lg" bg="dark" variant="dark"> <Navbar.Brand href="#home">React-Bootstrap</Navbar.Brand> <Navbar.Toggle aria-controls="responsive-navbar-nav" /> <Navbar.Collapse id="responsive-navbar-nav"> <Nav className="mr-auto"> <Nav.Link href="#features">Home</Nav.Link> <Nav.Link href="#pricing">About Us</Nav.Link

OverlayTrigger on custom component not working

一笑奈何 提交于 2020-04-16 02:47:19
问题 I'm trying to show a Popover when a custom component (a button) is hovered: class MyComponent extends React.PureComponent<MyComponentProperties> { public render(): JSX.Element { const overlay: JSX.Element = ( <Popover id={this.uuid}> <Popover.Content> Hello world! </Popover.Content> </Popover> ); return <OverlayTrigger trigger="hover" placement="auto" delay={{show : 700, hide : 0}} overlay={overlay}> <MyFancyButton ... /> </OverlayTrigger > } } class MyFancyButton extends React.PureComponent