Skip to content

Commit 4920694

Browse files
authored
Merge pull request #631 from IgniteUI/skrastev/more-fixes-5.0.0
Further update and clear size property where has default value set. Small other fixes.
2 parents 16541af + fadc03b commit 4920694

26 files changed

Lines changed: 112 additions & 57 deletions

File tree

samples/grids/grid/data-searching/src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
IgrComponentValueChangedEventArgs,
1515
IgrIconButton,
1616
IgrInput,
17+
IgrInputBase,
1718
IgrInputModule,
1819
IgrIconButtonModule,
1920
} from "igniteui-react";
@@ -56,7 +57,7 @@ export default function Sample() {
5657
}
5758
}, []);
5859

59-
function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) {
60+
function handleOnSearchChange(input: IgrInputBase, event: IgrComponentValueChangedEventArgs) {
6061
setSearchText(event.detail);
6162
gridRef.current.findNext(event.detail, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected);
6263
}

samples/grids/grid/finjs/src/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ igc-toast {
114114
padding-inline-end: 15px;
115115
}
116116

117+
.size-small {
118+
--ig-size: var(--ig-size-small);
119+
}
120+
117121
.gridSize {
118122
--ig-size: var(--ig-size-medium);
119123
}

samples/grids/grid/finjs/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function priceTemplate(ctx: {dataContext: IgrCellTemplateContext}) {
9090
function chartBtnTemplate(ctx: {dataContext: IgrCellTemplateContext}) {
9191
const cell = ctx.dataContext.cell;
9292
const rowData = gridRef.current.getRowData(cell.id.rowID);
93-
return <span onClick={e => openDialogForRow(e, rowData)}><IgrIcon name="insert_chart" collection="material" variant="contained" size="small">
93+
return <span onClick={e => openDialogForRow(e, rowData)}><IgrIcon name="insert_chart" collection="material" variant="contained" className="size-small">
9494
</IgrIcon></span>
9595
}
9696

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.size-small {
2+
--ig-size: var(--ig-size-small);
3+
}
4+
5+
.size-medium {
6+
--ig-size: var(--ig-size-medium);
7+
}
8+
9+
.size-large {
10+
--ig-size: var(--ig-size-large);
11+
}

samples/grids/list/overview/src/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default class ListOverview extends React.Component<any, any> {
1515

1616
constructor(props: any) {
1717
super(props);
18-
this.state = { listSize: "large" };
18+
this.state = { listSize: "medium" };
1919
this.onRadioChange = this.onRadioChange.bind(this);
2020
}
2121

@@ -26,15 +26,15 @@ export default class ListOverview extends React.Component<any, any> {
2626
<IgrRadio name="size" value="small" labelPosition="after" change={this.onRadioChange}>
2727
<span>Small</span>
2828
</IgrRadio>
29-
<IgrRadio name="size" value="medium" labelPosition="after" change={this.onRadioChange}>
29+
<IgrRadio name="size" value="medium" labelPosition="after" checked={true} change={this.onRadioChange}>
3030
<span>Medium</span>
3131
</IgrRadio>
32-
<IgrRadio name="size" value="large" labelPosition="after" checked={true} change={this.onRadioChange}>
32+
<IgrRadio name="size" value="large" labelPosition="after" change={this.onRadioChange}>
3333
<span>Large</span>
3434
</IgrRadio>
3535
</IgrRadioGroup>
3636

37-
<IgrList size={this.state.listSize}>
37+
<IgrList className={'size-' + this.state.listSize}>
3838
<IgrListHeader>
3939
<span>Contacts</span>
4040
</IgrListHeader>

samples/grids/tree-grid/data-searching/src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
IgrIconButton,
1717
IgrIconButtonModule,
1818
IgrInput,
19+
IgrInputBase,
1920
IgrInputModule,
2021
} from "igniteui-react";
2122

@@ -57,7 +58,7 @@ export default function Sample() {
5758
}
5859
}, []);
5960

60-
function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) {
61+
function handleOnSearchChange(input: IgrInputBase, event: IgrComponentValueChangedEventArgs) {
6162
setSearchText(event.detail);
6263
gridRef.current.findNext(event.detail, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected);
6364
}

samples/grids/tree-grid/toolbar-sample-2/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
IgrTreeGridModule,
1616
} from "igniteui-react-grids";
1717
import { IgrColumn } from "igniteui-react-grids";
18-
import { IgrAvatar, IgrAvatarModule, IgrComponentValueChangedEventArgs, IgrInput, IgrInputModule, IgrSwitch, IgrSwitchModule } from "igniteui-react";
18+
import { IgrAvatar, IgrAvatarModule, IgrComponentValueChangedEventArgs, IgrInput, IgrInputBase, IgrInputModule, IgrSwitch, IgrSwitchModule } from "igniteui-react";
1919

2020
import "igniteui-react-grids/grids/combined";
2121
import "igniteui-react-grids/grids/themes/light/bootstrap.css";
@@ -47,7 +47,7 @@ export default function App() {
4747

4848
const spanRef = useRef(null);
4949

50-
const changeTitle = (input: IgrInput, event: IgrComponentValueChangedEventArgs) => {
50+
const changeTitle = (input: IgrInputBase, event: IgrComponentValueChangedEventArgs) => {
5151
spanRef.current.innerText = event.detail;
5252
}
5353

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
/* shared styles are loaded from: */
2-
/* https://static.infragistics.com/xplatform/css/samples */
2+
/* https://static.infragistics.com/xplatform/css/samples */
3+
4+
.size-small {
5+
--ig-size: var(--ig-size-small);
6+
}
7+
8+
.size-medium {
9+
--ig-size: var(--ig-size-medium);
10+
}
11+
12+
.size-large {
13+
--ig-size: var(--ig-size-large);
14+
}

samples/inputs/chip/size/src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ export default class ChipSize extends React.Component<any, any> {
1515
public render(): JSX.Element {
1616
return (
1717
<div className="container sample" style={{flexDirection: "row", gap: "8px", alignItems: "baseline"}}>
18-
<IgrChip size="small" selectable="true" removable="true">
18+
<IgrChip className="size-small" selectable="true" removable="true">
1919
<span>Chip</span>
2020
</IgrChip>
21-
<IgrChip size="medium" selectable="true" removable="true">
21+
<IgrChip className="size-medium" selectable="true" removable="true">
2222
<span>Chip</span>
2323
</IgrChip>
24-
<IgrChip size="large" selectable="true" removable="true">
24+
<IgrChip className="size-large" selectable="true" removable="true">
2525
<span>Chip</span>
2626
</IgrChip>
2727
</div>
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
/* shared styles are loaded from: */
2-
/* https://static.infragistics.com/xplatform/css/samples */
2+
/* https://static.infragistics.com/xplatform/css/samples */
3+
.size-large {
4+
--ig-size: var(--ig-size-large);
5+
}

0 commit comments

Comments
 (0)