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

Table pagination not working #26

Open
cdhf opened this issue Jun 25, 2021 · 1 comment
Open

Table pagination not working #26

cdhf opened this issue Jun 25, 2021 · 1 comment

Comments

@cdhf
Copy link

cdhf commented Jun 25, 2021

I've copied code from the examples to play around with Stipple, and found the following behaviour.

When I use a model field for the DataTablePagination object that is simply named "pagination", the table in the browser only shows the first five rows, and this cannot be changed. Renaming that field to anything else fixes the table. A working and a broken example are attached.

example.zip

@hhaensel
Copy link
Member

I have half of the clue.

Have a look, what

julia> table(:data, pagination=:pagination)
"<template><q-table :columns=\"data.columns_data\" v-model=\"data\" :data=\"data.data_data\" row-key=\"__id\" :pagination.sync=\"pagination\"></q-table></template>"

does. This is because of the argument mappings StippleUI.API.ATTRIBUTES_MAPPINGS that Stipple performs for convenience.

In a recent use case of the QTree element, I also needed to make use of synced properties (expanded, ticked, selected). I realised that I did not work as soon as I named the model properties identical to their element counter parts. So that seems to be a very general behaviour. maybe @essenciary has a clue why this is. The documentation of quasar would allow this. I think, it is some weired scoping and depends how Quasar is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants