CSS not loading correctly With React-bootstrap-typeahead - react-bootstrap-typeahead

I'm trying to implement the typeahead using Meteor with react syntax. I found this library and it look like really good but I'm having some problems with CSS.
My actual code is as the image above
Real Code
And as we can see in the image above the functionality is there but apparently with wrong CSS
Any Idea of what I'm doing wrong?

Import bootstrap.min.js into your application.
Use the following link:
https://react-bootstrap.github.io/getting-started/introduction/
OR
Import bootstrap.min.css into your application.
Use the following link:
https://react-bootstrap.github.io/getting-started/introduction/#stylesheets
Adding this to the html worked in my case.

Related

Issue migrating to material ui v5 using datepicker and next

Getting Module not found: Can't resolve 'luxon' when using LocalizationProvider with AdapterLuxon and Next
I'm hoping I have something setup incorrectly.
codesandbox with the issue:
https://codesandbox.io/s/package-test-chyxlo?file=/pages/index.js
Turns out I was reading the docs wrong. Mui provides the adapters out of the box but you still need to include the utility package that you want. In my case, luxon.

Can't get the DOM in a react app using testcafe

I'm new into testcafe. I have a react app which was made by create-react-app, and I'm trying to do very simple function:
await t.expect(ReactSelector('ReactHighcharts').exists.ok()
I figured out that no matter what component I put inside the selector I get flase.
When I explored more, I saw that react-scripts probably minifies/uglifies by his webpack, my code, and that's
why I can't get the DOM.
Am I right? if yes - how can I disable it? if not, I'd like to understand why the DOM is unreachable.
You can explicitly set the displayName property for a component or consider testing the dev build.
https://reactjs.org/docs/react-component.html#displayname

Can I use material-ui-pickers without React?

I'd like to use material-ui-pickers without React. I have a Rails app (probably not relevant) and use Webpack as a module bundler (plus Yarn, Babel etc.)
Is it possible to use material-ui-pickers?
If so, how? I have a few text fields with a class "datepicker" and would like to open the Material UI picker on focus. I probably have to initialize a MuiPickersUtilsProvider somehow but couldn't get it to work.
Any help is appreciated!
no, you cannot use this library without using react

Adding a template to React Component

Im using the login example from the Meteor React Tutorial
meteor add accounts-ui accounts-password
Its all ok but Im trying to find the file and change it but I dont know where is it.
This is my code:
import { Blaze } from 'meteor/blaze';
export default class AccountsUIWrapper extends Component {
componentDidMount(){
this.view = Blaze.render(Template.loginButtons,
ReactDOM.findDOMNode(this.refs.container));
}
componentWillUnmount(){
Blaze.remove(this.view);
}
render(){
return <span ref="container"/>
}
}
And i have installed meteor add useraccounts:materialize
How can I put the template on this?
You need to put your component inside /imports/ui/ directory and name the file as AccountsUIWrapper.jsx
So it will be saved as /imports/ui/AccountsUIWrapper.jsx.
Then you can import your wrapped component inside /imports/ui/App.jsx file with:
import AccountsUIWrapper from './AccountsUIWrapper.jsx';
And then use it in your React render function in the same file as:
<AccountsUIWrapper />
The tutorial lays it out pretty clearly, including all the filenames and locations. You should be able to access their GitHub repository for the same.
If you want, for reference, you can also take a look at my code at this particular step back when when I did this tutorial myself.
Update: For useraccounts:materialize
The useraccounts:materialize package that you have mentioned depends on useraccounts:core package as its base. So you cannot apply useraccounts:materialize to default meteor accounts package directly.
Follow the instructions on useraccounts:core to set it up. You may need to remove accounts-ui as well, as it would likely clash with the above packages.
Then, go through the documentation for useraccounts that shows how to render their accounts template in Blaze.
After that, using the same way as shown in the tutorial, you should be able to create a new React wrapper for useraccounts:materialize Blaze template.
Here are links to boilerplate useraccounts:materialize code for Iron Router and Flow Router. From these you can take reference for the Blaze template code, which you can then wrap in React:
Boilerplate with iron:router
Boilerplate with FlowRouter

RichTextToolbar in GWT 2.3

I'm trying to create a RichTextArea (following the GWT Showcase : link )
When I do a code completion of RichTextToolbar, I'm not able to find it. Is this an external library?
And then I googled and found this : google code link. Is this the same library in the Google Showcase? Or is the RichTextToolbar is an old implementation that not being brought to version 2.3?
Update:I tested this and what I feel is although the implementation the same, the UI looks different though.
It seems that they created their own version of RichTextToolbar.
This class is part of the GWT Showcase.
Here is a decent explanation to get the RichTextToolbar working. You take the source code from showcase basicaly.
http://www.jeanhsu.com/2010/06/10/how-to-use-richtexttoolbar-in-gwt/