File tree Expand file tree Collapse file tree 5 files changed +29
-9
lines changed
grid/clipboard-operations/src
tree-grid/clipboard-operations/src Expand file tree Collapse file tree 5 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ defineAllComponents();
1010import "./index.css" ;
1111
1212export class Sample {
13+ private defaultSeparator : string ;
1314 private grid : IgcGridComponent
1415 private _bind : ( ) => void ;
1516
@@ -44,7 +45,10 @@ export class Sample {
4445
4546 var input = document . getElementById ( "input" ) as IgcInputComponent ;
4647 input . addEventListener ( "igcChange" , ( ev : CustomEvent ) => {
47- grid . clipboardOptions . separator = ev . detail ;
48+ if ( ! this . defaultSeparator ) {
49+ this . defaultSeparator = grid . clipboardOptions . separator ;
50+ }
51+ grid . clipboardOptions . separator = ev . detail || this . defaultSeparator ;
4852 } ) ;
4953 }
5054 this . _bind ( ) ;
@@ -65,7 +69,6 @@ export class Sample {
6569 column . formatter = ( e : any ) => { return "** " + e + " **" } ;
6670 column . header = "🎉" + column . field ;
6771 }
68-
6972}
7073
7174new Sample ( ) ;
Original file line number Diff line number Diff line change 1313 < div class ="container sample center ">
1414 < igc-radio-group id ="radio-group " alignment ="horizontal " style ="margin-bottom: 10px; ">
1515 < igc-radio name ="size " value ="small " label-position ="after "> Small</ igc-radio >
16- < igc-radio name ="size " value ="medium " label-position ="after "> Medium</ igc-radio >
17- < igc-radio name ="size " value ="large " label-position ="after " checked > Large</ igc-radio >
16+ < igc-radio name ="size " value ="medium " label-position ="after " checked > Medium</ igc-radio >
17+ < igc-radio name ="size " value ="large " label-position ="after "> Large</ igc-radio >
1818 </ igc-radio-group >
1919
2020 < igc-list id ="list ">
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export class Sample {
1717 private clipboardHeadersEditor : IgcPropertyEditorPropertyDescriptionComponent
1818 private clipboardFormattersEditor : IgcPropertyEditorPropertyDescriptionComponent
1919 private treeGrid : IgcTreeGridComponent
20+ private defaultSeparator : string ;
2021
2122 constructor ( ) {
2223 var clipboardEnabledEditor = this . clipboardEnabledEditor = document . getElementById ( 'ClipboardEnabledEditor' ) as IgcPropertyEditorPropertyDescriptionComponent ;
@@ -51,7 +52,10 @@ export class Sample {
5152
5253 var input = document . getElementById ( "input" ) as IgcInputComponent ;
5354 input . addEventListener ( "igcChange" , ( ev : CustomEvent ) => {
54- grid . clipboardOptions . separator = ev . detail ;
55+ if ( ! this . defaultSeparator ) {
56+ this . defaultSeparator = grid . clipboardOptions . separator ;
57+ }
58+ grid . clipboardOptions . separator = ev . detail || this . defaultSeparator ;
5559 } ) ;
5660 }
5761
Original file line number Diff line number Diff line change 1515< body >
1616 < div id ="root ">
1717 < div class ="container sample center ">
18- < igc-avatar initials ="AZ " >
19- < igc-icon name =" home " collection =" material "> </ igc-icon >
20- </ igc-avatar >
18+ < igc-avatar class =" size-large " initials ="L " > </ igc-avatar >
19+ < igc-avatar class =" size-medium " initials =" M "> </ igc-avatar >
20+ < igc-avatar class =" size-small " initials =" S " > < /igc-avatar >
2121 </ div >
2222 </ div >
2323
Original file line number Diff line number Diff line change 1- igc-avatar {
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 {
210 --ig-size : var (--ig-size-large );
11+ }
12+
13+ .sample {
14+ flex-direction : row;
15+ gap : 10px ;
316}
You can’t perform that action at this time.
0 commit comments