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.

Button for ListItem doesn't work

See original GitHub issue
button - boolean To navigate on click of a list item.

But it doesn’t work. Where do you place that button?

        listItems = config.reduce( (all, item, idx) => {
            all.push(
                <ListItem key={item.i18n} button={true} first>
                    <Text button>{item.i18n}</Text>
                </ListItem>
            )
            return all;
        }, []);

                    <List button={true} first={true}>
                        { listItems }
                    </List>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SupriyaKalghatgicommented, Jul 17, 2018

@wzup Please use polite words

0reactions
wzupcommented, Jul 17, 2018

You have to use <Right> component in order to have right chevron. See below

You do not document it. This is bad. Time consuming for us developers.

first doesn’t work anyway

            <ListItem key={item.list}
                button={true}
                first={props.index === 0}
                style={listItem}
                >
                <Left>
                    <Text style={css.text}>{item.text}</Text>
                </Left>
                <Right>
                    <Icon name="arrow-forward" style={css.chevron} />
                </Right>
            </ListItem>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Customer ListItem of Selectable List doesn't work in material-ui
I used the Selectable List, but if i wrote a custome listitem, the List isn't selectable. If I used listitem directly, the list...
Read more >
Typescript: in ListItem, property button is no more boolean ...
The following code in not compiling anymore in mui v4.0: where editable is a boolean value. This is not a v0.x issue.
Read more >
ListItemButton API - Material UI - MUI
API reference docs for the React ListItemButton component. Learn about the props, CSS, and other APIs of this exported module.
Read more >
Solved: Create new sharepoint list item by clicking a butt...
Solved: Hi, is there a function / parameter which allows me to create a new item in a sharepoint list by clicking a...
Read more >
Swiftui list row with multiple buttons? - Apple Developer
But then one doesn't get the helpful flash animation available in a button. Looking particularly for a way to get items 2 and...
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