semantic-ui-react

Why custom css class does not work on React-Semantic-UI elements?

╄→尐↘猪︶ㄣ 提交于 2020-06-27 16:40:19
问题 I created card with react-semantic-ui, I want to add some extra styles via css class. One example is : I add custom 'card' class with box-shadow property, and that style is not applied. HTML PART: import './App.css'; {/* CLAIM CARDS SECTION */} <Card className='card'> <Card.Content> <Card.Header style={{display: 'flex', justifyContent: 'space-between', alignItems: 'center'}}> <h4> Church Mutual Worker's Compensation Claim <span style={{marginLeft: '130px'}}>Claim #1234567</span> </h4> </Card

semantic-ui-react fixed sidebar and navbar: can't get sidebar and content to scroll nicely

瘦欲@ 提交于 2020-06-27 10:42:12
问题 I'm new to semantic-ui-react and stuck trying to implement this layout. Look at this fiddle This is the closest I've been able to achieve. The two components have scroll-able areas (desired) but my primary issue is the sidebar doesn't stay fixed when scrolling in content, and scrolling to the bottom of the sidebar there is whitespace beneath. Any ideas? Here is the relevant component code: <div style={{paddingTop: '51px'}}> <Menu size="massive" fixed="top" inverted borderless > <Menu.Item

useEffect not working with multiple dropdowns in Semantic UI React

随声附和 提交于 2020-06-17 09:42:26
问题 I am using Semantic UI React. The following JS code does not work for me: import React, { useState, useEffect } from "react"; import { Dropdown, Form, Button } from "semantic-ui-react"; export const MovieDropdown = () => { const [movie, setMovie] = useState(""); const [person, setPerson] = useState(""); const [movieOptions, setMovieOptions] = useState([]); const [personOptions, setPersonOptions] = useState([]); useEffect(() => { Promise.all([ fetch("/people").then(res => res.json() ), fetch("

Sidebar + Fixed Top Menu in Semantic-UI React

孤街浪徒 提交于 2020-05-29 11:09:22
问题 Is it possible to have a Sidebar + Fixed Top Menu in Semantic-UI React? 回答1: have you tried something like this ? <!-- Top fixed menu --> <Menu fixed="top"> <Button className="item" onClick={this.toggleVisible}> <i className="sidebar icon" /> </Button> <Menu.Item name="home" as={Link} to="/your_route"> <Icon name="home" />Menu item </Menu.Item> </Menu> <!-- Sidebar & pusher --> <Sidebar.Pushable as={Segment}> <!-- Sidebar menu --> <Sidebar visible={this.state.visible} as={Menu} animation=

Sidebar + Fixed Top Menu in Semantic-UI React

我是研究僧i 提交于 2020-05-29 11:09:14
问题 Is it possible to have a Sidebar + Fixed Top Menu in Semantic-UI React? 回答1: have you tried something like this ? <!-- Top fixed menu --> <Menu fixed="top"> <Button className="item" onClick={this.toggleVisible}> <i className="sidebar icon" /> </Button> <Menu.Item name="home" as={Link} to="/your_route"> <Icon name="home" />Menu item </Menu.Item> </Menu> <!-- Sidebar & pusher --> <Sidebar.Pushable as={Segment}> <!-- Sidebar menu --> <Sidebar visible={this.state.visible} as={Menu} animation=

Sidebar + Fixed Top Menu in Semantic-UI React

限于喜欢 提交于 2020-05-29 11:09:13
问题 Is it possible to have a Sidebar + Fixed Top Menu in Semantic-UI React? 回答1: have you tried something like this ? <!-- Top fixed menu --> <Menu fixed="top"> <Button className="item" onClick={this.toggleVisible}> <i className="sidebar icon" /> </Button> <Menu.Item name="home" as={Link} to="/your_route"> <Icon name="home" />Menu item </Menu.Item> </Menu> <!-- Sidebar & pusher --> <Sidebar.Pushable as={Segment}> <!-- Sidebar menu --> <Sidebar visible={this.state.visible} as={Menu} animation=

Why datepicker flicker in React when focus in input field?

北慕城南 提交于 2020-05-29 10:19:10
问题 Could someone please tell me why datepicker flickers in React when focus in input field? I am using this date picker in my demo https://www.npmjs.com/package/semantic-ui-calendar-react but it flickers on focus or in other words when I focus to input field its first show on top and then come down below input field, why? Here is my code https://codesandbox.io/s/prod-hill-mpurn <div style={{ position: "absolute", top: 100, left: 100 }}> <DateInput name="date" placeholder="Date" value={date}

How to do Dynamic images in ReactJS?

喜欢而已 提交于 2020-05-29 08:21:50
问题 In my system I have a few images that a user can have presented and it's extremely advantageous to me to be able to just pass in an id and then have that image be presented to the user. (One use case: Articles in the system have images associated with them, there are many articles in the system, it'd be ideal to pull out just the image-id and have the image dynamically displayed based upon that id. There is no realistic possible way I can statically give an image path for each article.)

How to use onChange method in semantic react dropdown

六眼飞鱼酱① 提交于 2020-05-25 06:33:34
问题 Can someone help me out how to use onChange in dropdown (Semantic UI React). I am reading the docs, but still, I don't get it. It does have onChange props. onChange(event: SyntheticEvent, data: object) How do I use it? Like, I have method dropdownmethod() . edit - implemented the suggestion, but it didn't work. I think in your suggestion, you didn't bind the function. But, I bind the function. onChangeFollower(event,data){ console.log("on change follower",data.text) } render() { console.log(

custom className semantic ui react

自作多情 提交于 2020-02-25 05:42:45
问题 I was hoping to do something like this: <Divider className="homepage-divider" /> But no matter if I add a class name this is all that shows up: <div class="ui divider"></div> How do I make my own className. I would like to use the divider multiple times with different widths. I know how to customize it with the override files already but that would set my regular divider to a set width. 回答1: as Tholle mentioned, it should work. see working example: https://codesandbox.io/s/2p398kyykr 回答2: