0

Listbox, hflex="min" and paging

asked 2019-09-15 15:06:17 +0800

adilov gravatar image adilov
55 3

updated 2019-09-16 14:58:16 +0800

Hello, I have a strange issue with listboxes and setting hflex to its columns. The issue is reproduced only if there's a paging inside the listbox - at the listfooter. Take a look at this fiddle.

If you run it you'll see the first column (ID) is quite wide. Then, you can remove the "paging" tag (only the paging tag, nothing else, not the list footer, nothing...) and everything goes as expected - the first column is shrunk to its content minimum.

If I move the paging tag outside the listbox, the column also is shrunk to its minimum.

Can you point my the mistake with the approach I'm using?

Thank you!

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-09-16 18:45:38 +0800

cor3000 gravatar image cor3000
4791 2 7
ZK Team

I think there's nothing technically wrong with your case, it just seems unnecessary.

The paging control renders at the bottom of a listbox by default anyway, so there's no need to place it into a list footer, which might affect the calculated min width for the first column (the footer is still part of the listbox. similar to the listheaders they contribute to min width calculations)

Here your updated example showing the default behavior without the sizing issue:

http://zkfiddle.org/sample/3qsr7a5/2-hflex-min-and-paging

link publish delete flag offensive edit

Comments

Unfortunately I really need to specify the paging, because it uses custom db fetching page by page:

<paging activePage="@load(vm.logs.page)" onPaging="@command('onPageChanged')" detailed="true" pageSize="@load(vm.logs.pageSize)" totalSize="@load(vm.logs.totalSize)"/>

adilov ( 2019-09-16 21:05:17 +0800 )edit

how about adding the paging control below the listbox? http://zkfiddle.org/sample/3qsr7a5/3-hflex-min-and-paging

cor3000 ( 2019-09-17 10:42:56 +0800 )edit

Yup, this is a workaround, but it's not "packed" inside the list. So I'm not doing anything wrong? I'll play a bit with the css and will take it out outside the listbox then. Thanks! :)

adilov ( 2019-09-18 12:58:40 +0800 )edit

you aren't doing anything wrong, listbox isn't wrong either. just the expectation doesn't match the current implementation. And placing the paging control into the footer is just unexpected, untested by ZK. If you have styling problems, let me know which Theme you're using and I'll try to assist.

cor3000 ( 2019-09-19 11:34:31 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2019-09-15 15:06:17 +0800

Seen: 11 times

Last updated: Sep 18

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More