-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Description
There are a few components whose DOM layout changes depending on the applied theme (for example, igx-input-group). When an exported Igc component—such as the grid with advanced filtering or the query builder—is used in a Web Components sample with the Bootstrap theme applied, those input groups continue to render using the default (Material) theme. This results in a visually incorrect appearance.
This is a query builder with bootstrap theme imported. However the igx-input-group used in there is still material.
Note that this is also reproducible in the grid with advanced-filtering. You can see it here:
Open the advanced filtering, add a condition and observe the input-group:
Steps to reproduce
- Run the attached sample
npm installandnpm run start
Result
If you import the theme in the index.ts file like this:
import "igniteui-webcomponents-grids/grids/themes/light/bootstrap.css";
You can observe that the query builder works but the igx-input-group underneath is still having the material layout.
The only working workaround is to either set the theme in the head of the root html file
like
<link rel="stylesheet" href="https://unpkg.com/igniteui-webcomponents-grids@6.2.2/grids/themes/light/bootstrap.css" />
or
<style>
body {
--ig-theme: bootstrap;
}
</style>
Expected result
Even though there is a workaround, I dont think that we should guide the users to use it like this. It should work out of the box.