Skip to content
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

Basic-table: Revert back noRowsOverlayComponentParams prop #1623

Closed
antonantonovich opened this issue Dec 3, 2024 · 8 comments · Fixed by #1642
Closed

Basic-table: Revert back noRowsOverlayComponentParams prop #1623

antonantonovich opened this issue Dec 3, 2024 · 8 comments · Fixed by #1642
Assignees
Labels
approved User request approved bug Something isn't working request User request

Comments

@antonantonovich
Copy link

antonantonovich commented Dec 3, 2024

Detailed description of how to reproduce the problem

Table not rendered and Exception logged:
index.js:52 TypeError: params.noRowsMessageFunc is not a function
at CustomNoRowsOverlay.init (customNoRowsOverlay.ts:10:1)

That was broken after commit c35ce5e where params were deleted

-     noRowsOverlayComponentParams: {
-        noRowsMessageFunc: () =>
-          'No rows found at: ' + new Date().toLocaleTimeString(),
-      },

Upload a screenshot

image
image

Describe the development framework

No response

Expected behavior

Table should render

Additional information

No response

@antonantonovich antonantonovich added bug Something isn't working request User request labels Dec 3, 2024
@tishoyanchev
Copy link
Contributor

@antonantonovich
Hi, thank you for your submission.
Can you please provide more details about this issue?
Which table, basic or advanced, and what is your environment? How are you trying to render the table?
For me both tables render without any issues.

@antonantonovich
Copy link
Author

Basic table. I use react wrapper like that.

 <IfxBasicTable
                  cols='[{"headerName":"Make","field":"make","sortable":true,"sort":"desc","unSortIcon":true},{"headerName":"Model","field":"model","sortable":true,"unSortIcon":true}]'
                  rows='[{"make":"Toyota","model":"Celica","price":35000,"age":10},{"make":"Ford","model":"Mondeo","price":32000,"age":12},{"make":"Porsche","model":"Boxster","price":72000}]'
                  table-height='auto'>
                </IfxBasicTable>

@tishoyanchev
Copy link
Contributor

@antonantonovich
I can't reproduce the issue.
Maybe try cleaning the cache and pull again the latest version if you haven't already?
There were some major releases recently, make sure your version is up to date, clean the cache, and try again.
Try isolating the table from the rest of your code to test if the code isn't affecting the table somehow.
In this commit c35ce5e I simply re-introduced the dynamic update of cols and rows + streamlined some of the code. There is nothing essentially "new".

@antonantonovich
Copy link
Author

you removed the property noRowsMessageFunc in that commit that was introduced 10 month ago.
that property used in CustomNoRowsOverlay component
That component inited createGrid(this.container, this.gridOptions); line

I don't know how it works for you and how it supposed to work.

image

@antonantonovich
Copy link
Author

That's not "new", that's a regression. noRowsOverlayComponent was introduced long ago and now it broken

@tishoyanchev
Copy link
Contributor

Your issue has been approved! You can follow the latest status on our public backlog board. Thank you for your contribution!

@tishoyanchev
Copy link
Contributor

@antonantonovich
noRowsOverlayComponent property is not removed. Only the noRowsOverlayComponentParams was removed, which sets the noRowsMessageFunc, which adds a message when cells are empty. This property is not responsible for the initiation of the table, and the issue you are facing.
As I am not able to reproduce this issue, I have to once again ask you to please look into your code to make sure you are using the latest version of our package, clean the cache, and if the issue is still occurring, then please provide more context about how you are using the table.

@antonantonovich
Copy link
Author

Yes, noRowsOverlayComponentParams removed as I showed on screenshot. But that property provided noRowsMessageFunc which is required by the component CustomNoRowsOverlay. That overlay displayed when table initially has no data and that causes aggrid failure.

As we using react wrapper -- all properties updated dynamically. When we initially render the table -- we have no rows. And then when rows comes, we expect from table to be updated.
And the problem is that when table was rendered initially with empty rows -- it failed to construct aggrid due to CustomNoRowsOverlay fail. When we pass rows after it -- nothing happened because aggrid not built.

@tishoyanchev tishoyanchev changed the title ifx-basic-table: Table not displayed. Error params.noRowsMessageFunc is not a function Basic-table: Revert back noRowsOverlayComponentParams prop Dec 11, 2024
@tishoyanchev tishoyanchev moved this from Mid Priority to Released in Infineon Digital Design System - Public Board Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved User request approved bug Something isn't working request User request
Development

Successfully merging a pull request may close this issue.

2 participants