question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bootstrap - 4 framework causing issues in template using ngx-boostrap

See original GitHub issue

Issue type

I’m submitting a (check one): [x] Bug report [ ] Feature request [ ] Regression (something that used to work, but stopped working in a newer version) [x] Support request [x] Documentation issue or request

Prerequisites

Before posting, make sure you do the following (check all): [x] Confirm you are using the latest versions of all necessary packages (or if not, explain why not) [x] Search GitHub for a similar issue or PR [x] If submitting a Support request, also search Stack Overflow for similar issues Note: Please cross-post GitHub support requests to Stack Overflow, and include a link in your GitHub issue to your Stack Overflow question. We do currently respond to support requests on GitHub, but we eventually expect to stop, and will then refer all support questions exclusively to Stack Overflow.

Current behavior

When using the Bootstrap - 4 framework there seems to be some conflict with my Gradient Able template, When typing into any input box the whole screen flickers. I narrowed it down to a conflict between the bootstrap 4 css and the template’s ngx-bootrstrap css.

Commenting out the stylesheets from angular2-json-schema-form.es5.js resolved the problem

'bootstrap-4': { framework: Bootstrap4FrameworkComponent, stylesheets: [ <!-- removed the styles here --> ], scripts: [ '//code.jquery.com/jquery-3.2.1.slim.min.js', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js', , ], }

I also set load external assets to false

<json-schema-form framework="bootstrap-4" loadExternalAssets="false" [schema]="formSchema" [model]="formModel" [layout]="formLayout" (onSubmit)="submit($event)" [(model)]="formData"> </json-schema-form>

How do I create my own custom framework to avoid modifying anything in the node_modules/angular4-json-schema-form folder

Expected behavior

IMPORTANT: How can we reproduce your problem?

You can checkout my repo at https://github.com/neil-coutinho/qdemo.git

You can view my sandbox at http://localhost:4200/schema

Environment

OS name & version: Browser name & version: Angular version: Angular JSON Schema Form version(s): Other relevant software or packages:

Any other relevant information

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
neil-coutinhocommented, Mar 7, 2018

@lucasgranberg

Putting square brackets around loadExternalAssets resolved the issue.

<json-schema-form framework="bootstrap-4" [loadExternalAssets]="false" [schema]="formSchema" (onSubmit)="submit($event)"> </json-schema-form>

0reactions
rmayuricommented, Apr 26, 2018

@neil-coutinho HI, I am using bootstrap4module framework, the form is getting loaded but I am not able to read the form values, could you please provide any example to read the values and applying css. below are my fiels for your reference,

login.component.ts import { Component } from ‘’; @component({ selector: ‘app-login’, templateUrl: ‘./login.component.html’, styleUrls: [‘./login.component.css’] })

export class LoginComponent { title = ‘Optum Navigator’; mySchema = { “properties”: { “msid”: { “type”: “string”, “required”:true, “htmlClass”: “mystyle”, }, “password”: { “type”: “string”, “widget”: “password”, “required”:true }, } }; myform = { “form”: [ “msid”, “password”, { “type”: “submit”, “name”: “btnSubmit”, “title”: “Login”,

} ] }; public OnSubmitFn(event:any){ console.log(“login”+event); } }

login.component.html <json-schema-form loadExternalAssets=“true” [schema]=“mySchema”
[form]="myform " (onSubmit)=“OnSubmitFn($event)” >
</json-schema-form>

login.component.css

.mystyle {
    border: 2px solid red;
    border-radius: 4px;
}

Thanks in advance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Most Common Bootstrap Mistakes That Developers Make
Most of the important pitfalls are mentioned in the Bootstrap documentation, but still some mistakes are pretty subtle, or have ambiguous causes.
Read more >
Theming Bootstrap
Bootstrap 4 provides a familiar, but slightly different approach. Now, theming is accomplished by Sass variables, Sass maps, and custom CSS. There's no...
Read more >
Why mixing Joomla and Bootstrap may not be a great idea
3 is not the only conflict that can cause issues. When a template provider is logical and tries to keep their code clean...
Read more >
Should You Use Bootstrap for WordPress Theme Development?
Since the framework is comparatively simple in installation and operation, it enjoys great popularity and is used by many people who want just...
Read more >
To use or not to use Bootstrap Framework? - Creative Tim
The problem that Bootstrap solved from the beginning was inconsistencies between designers and developers working on their projects. This is one ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found