question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

List: NoDataText attribute doesn't show text on screen

See original GitHub issue

Describe the bug Using a List, the NoDataText attribute should show a message on the screen when the list is empty. The current behaviour does not show anything.

Isolated Example In the UI, we are showing a list of Cards. But when there is nothing to show and the list is empty, there is no message on the screen.

To Reproduce Steps to reproduce the behavior:

  1. Create a List
  2. Add ‘noDataText’ with any String
  3. There should be no text in the UI

Expected behavior When I have an empty list, there should be a message, using NoDataText

Screenshots UI: Screen Shot 2020-10-19 at 10 39 46

The List using NoDataText: Screen Shot 2020-10-19 at 10 50 40

The empty list without the text: Screen Shot 2020-10-19 at 10 40 58 Screen Shot 2020-10-19 at 10 53 13

UI5 Web Components for React Information @ui5/webcomponents version:1.0.0-rc.8 @ui5/webcomponents-react version:^0.10.9 Operating System: MAC OS Browser: Chrome

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
fifoosidcommented, Nov 12, 2020

Hi everyone,

  1. When it comes to Angular, I found two things. First of all the syntax in the provided codesandbox is not correct. When you are binding a property, you don’t need the square brackets around the variable name. Those are only needed when it comes to interpolation. Secondly, when you need to bind a kebab-case property, you need to convert it to camelCase. In our case, this means that the code for the ui5-list would look like this:
<ui5-list
    class="full-width"
    header-text="Products"
    [noDataText]="noDataText"
    separators="None"
  ></ui5-list>

The same logic should apply if we want to bind the header-text property of the list.

  1. When it comes to pure React + UI5 Web Components, looks like everything is working as expected. The following code snippet works:
 <ui5-list
          class="full-width"
          header-text="Products"
          no-data-text={noDataText}
          separators="None"
        ></ui5-list>

Moreover, the exact snippet from the initial issue works on my side as well on the current master version of UI5 Web Components:

 <ui5-list
          class="full-width"
          header-text="Products"
          no-data-text={'Some Cool Text here'}
          separators="None"
        ></ui5-list>
  1. When it comes to pure React + UI5 Web Components for React, everything seems to work as expected as well: https://codesandbox.io/s/wandering-grass-ve3y1?file=/src/App.js

I am closing the issue as everything seems to work as expected. If you think that I am missing something, please reopen the issue.

0reactions
nazarkulykcommented, Nov 12, 2020

@MarcusNotheis here an angular example for that:

codesandbox

to reproduce.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dxList does not display the no data text on the screen
I am using odata store in my project. so datasource objects always contains a value (not null) even they contains no record. dxList...
Read more >
SAPUI5: How to remove the No Data Text on List View
Hello Experts, I am working with the SAPUI5 list. I wonder if we can remove the "No Data" on the list when there...
Read more >
Custom text when gallery contains no items
I have a gallery that searches for users in my org based on the value from a SharePoint list. The gallery contains labels...
Read more >
sap.m.Table with invisible rows does not show "No data"
You're describing a situation where you've bound the Table's items aggregation but are just suppressing the row display with the visible property.
Read more >
The Text widget does not display multiple attribute records for ...
Open the ArcGIS Experience Builder project and navigate to the Insert widget panel. Under Data centric, drag and drop the List widget to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found