semantic-ui

Access HTML after this.render() in Iron Router

霸气de小男生 提交于 2019-12-12 03:19:03
问题 I need to apply some Semantic UI on newly rendered templates, but I have no idea how to get the rendered HTML from the router. Here's my code : Router.route('/', { name: 'home', where: 'client', action: function () { this.render('home'); }, onAfterAction: function () { console.log( $('#homeSidebar') ); } }); Basically, $('#homeSidebar') should return the sidebar element, but it returns nothing as the HTML is not yet available. The only solution, so far, was to change the function like this

Semantic UI Sidebar.Pushable won't update page content

坚强是说给别人听的谎言 提交于 2019-12-11 15:03:23
问题 I'm using redux to manage my sidebar visibility state(sidebarvis: true, false). Routing is also managed by redux. When I click a link to change pages within my visible sidebar, redux is successfully updating the router state, but the content within sidebar.pushable does not update until my sidebar is toggled(AKA until the toggleSideBar action is dispatched). In other words, redux is working properly, but the page doesn't render until the sidebar is toggled again. Has anyone else had this

Semantic UI React - Adding Reveal Effect to Images in Cards

ε祈祈猫儿з 提交于 2019-12-11 14:13:44
问题 The title says it all. Is it possible to add the Semantic UI Reveal effect to Images in Cards? This would be a very nice feature when designing ecommerce websites with Semantic UI + React, for example for having two images for each product, when hovering. Moreover, when using Semantic UI without React, it is totally possible. 回答1: It seems like the React component has a bug where its not specifying the width of the "visible" element in the Reveal. The "hidden" element does have a width of

How to translate a JQuery function value in Javascript to ScalaJS (scalajs-jquery)

柔情痞子 提交于 2019-12-11 13:45:13
问题 In my ScalaJS project I use Semantic-UI with scala-js-jquery I use this to monkey patch JQuery: // Monkey patching JQuery @js.native trait SemanticJQuery extends JQuery { def dropdown(params: js.Any*): SemanticJQuery = js.native def popup(params: js.Any*): SemanticJQuery = js.native // and more } // Monkey patching JQuery with implicit conversion implicit def jq2semantic(jq: JQuery): SemanticJQuery = jq.asInstanceOf[SemanticJQuery] For example $('select.dropdown').dropdown(); translates to

Semantic UI multisite

谁说我不能喝 提交于 2019-12-11 12:35:52
问题 Hello Stack community ! I use Semantic UI and I would like to know if it's possible to manage multiple themes (several themes in dist folder) for multiple sites in a single compilation (via gulp build) ? For my front and my backoffice ? For example : src/themes/site-1/ src/themes/site-2/ gulp compilation will generate : /dist/site-1/semantic.css /dist/site-2/semantic.css 回答1: You can create your own custom css for your sites (site1.css etc.) Your custom css classes are overwrites to Semantic

Simple non clickable text in semantic-ui dropdown

纵饮孤独 提交于 2019-12-11 11:37:33
问题 I am using semantic-ui and I want to show some info text in dropdown . But it act as a link even it's a <div class="header item"> Here profile, settings and logout are link and rest are text(non-clickable) sample mockup I tried with. <div class="ui dropdown item"> <i class="icon dropdown"></i> <div class="menu hidden"> <div class="header item">Narottam Guattom</div> <a href="#" class="item">Action one</a> <a href="#" class="item">Action one</a> <a href="#" class="item">Action one</a> </div> <

Dropdown Semantic-UI: Change the hidden filed values?

夙愿已清 提交于 2019-12-11 08:16:32
问题 I am working with semantic-ui dropdown. I am wondering on how to change the values in hidden field based on user selection from the dropdown list ? Related Question may be!. <div class="ui selection dropdown select-language"> <input name="language" type="hidden" value="Alpha-Male"> <div class="text">Gender</div> <i class="dropdown icon"></i> <div class="menu ui transition hidden"> <div class="item" data-value="Alpha-Male">Male</div> <div class="item active" data-value="Alpha-Female">Female<

React semantic-ui Dropdown onChange not working

眉间皱痕 提交于 2019-12-11 06:45:58
问题 Here's the code: class MenuContainerComponent extends Component { onInputWidgetMenuChange(event, data) { console.log(data); } render() { var inputWidgets = []; for (var i = 0; i < this.props.cdata.widgets.inputWidgets.length; i++) { var componentName = getComponentNameFromType(this.props.cdata.widgets.inputWidgets[i]); var key = "inputWidget" + i; inputWidgets.push(<Dropdown.Item key={key}>{componentName}</Dropdown.Item>); } return ( <Dropdown style={childStyle} text='Input widgets' icon=

disable semantic Button in react

一个人想着一个人 提交于 2019-12-11 06:43:14
问题 how to dynamically set semantic Button to disabled in react: <Button disabled>click here<Button> i tryed to set it with state but it gave me an error this.setState({d:'disabled'}) return (<Button {this.state.d} >click here<Button>) 回答1: It's impossible to tell how your Button is handling disabled under the hood but assuming it´s working like the JSX element . First, JSX elements are just functions that takes a set of arguments (props). So you still need to give it a disabled:boolean. As you

How to flip up shapes in shiny by clicking a button?

孤街浪徒 提交于 2019-12-11 05:55:53
问题 I want to include a semantic shape element in my shiny app (shapes: https://semantic-ui.com/modules/shape.html#/usage). I am able to construct the shape by using shinyjs and shiny.semantic . But I don't know how to create a button that flips the shape by clicking on it. Here an example: Ui.R: library(shiny) # Define UI for application that draws a histogram shinyUI(semanticPage( shinyjs::useShinyjs(), div(class="ui text shape", div(class="sides", div(class="ui header side active","This side