oleksandrbalan / lazytable

Lazy layout to display columns and rows of data on the two directional plane.
Apache License 2.0
261 stars 12 forks source link

Problem with scrollable column #11

Open Monabr opened 10 months ago

Monabr commented 10 months ago

So I have this:

Column(
   modifier = Modifier.verticalScroll(rememberScrollState())
) {
   ...
   LazyTable()
}

And this cause the exception.

When I do:

Column(
   modifier = Modifier.verticalScroll(rememberScrollState())
) {
   ...
   LazyTable(
      scrollDirection = LazyTableScrollDirection.HORIZONTAL
   )
}

It's still cause exception.

How so solve it?

oleksandrbalan commented 10 months ago

Hey 👋

It is forbidden in Compose to nest scrollable containers, that's why you are getting an exception.

What design are you trying to achieve?

Monabr commented 10 months ago

I want to get a design where the table is just one of the scrollable list items.

oleksandrbalan commented 10 months ago

Does a table in your case should really be lazy loaded? If no, it wound be much more easily to use some non-lazy table layout.

Monabr commented 10 months ago

Yes, it should be lazy loaded cause it have many items.

oleksandrbalan commented 10 months ago

And what about number of rows? Is it limited? Maybe you could simply replace LazyTable with LazyRow with items laid out as table items.

Or could you share some design / wireframe to better visualise it?

oleksandrbalan commented 4 months ago

@Monabr Hey 👋 Did you manage to solve your issue?