-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ttonev/hr portal #3
base: vnext
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be in the public folder. All things in public folder are served at the root path. This is not needed. This better be in src/assets
} | ||
|
||
async fetchData() { | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this to a separate service file so that it would be similar as the other samples
|
||
async fetchData() { | ||
try { | ||
const response = await fetch('https://staging7.infragistics.com/grid-examples-data/data/hr/hr.json'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move that url to a constant var
} | ||
|
||
clearSorting() { | ||
const treeGrid = this.shadowRoot?.getElementById('treeGrid') as IgcTreeGridComponent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the @query decorator to get a referance to the grid
} | ||
|
||
public avatarTemplate = (ctx: IgcCellTemplateContext) => { | ||
let row = ctx.cell.row; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isnt this the same as ctx.cell.value
? why get the value from the row. Same as all other body templates
|
||
body { | ||
display: flex; | ||
font-family: 'Helvetica', sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can set ig-scrollbar ig-typography
these two classes to the body element in the index.html and you wont need to set font-family here. Or even you insist on setting font-family here please use the corresponding --ig-font-family
var from the theme
color: #535bf2; | ||
} | ||
igc-tree-grid::part(row) { | ||
background-color: #ffffff(--row-even-background); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not used. Also, it is not a correct value for background-color
margin: 0 auto; | ||
padding: 2rem; | ||
align-items: center; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is gonna be a block container, then you dont need align-items
, justify-content
and gap
. Probably, wont need the margin
and text-allign
as well
} | ||
|
||
app-hr-portal { | ||
flex: 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These override the :host
styles that you set in the hr-portal.ts
file. If you dont need this, please remove it. Also, why flex on a host that has only 1 element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply some formatting to the file as well
No description provided.