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

[Request] - Qtree - Ability to specify a different label field than 'label' #2442

Closed
mgibson91 opened this issue Aug 21, 2018 · 1 comment
Closed
Milestone

Comments

@mgibson91
Copy link

I currently have multiple cases where data is being directly queried from a database to be displayed in a QTree.

The field name which contains the record label is 'value' although Quasar expects 'label'. I currently have a transform function which replaces the 'value' field with a 'label' field for every record.

The ability to specify, I want to the tree for each node to display the node.value field would be great and allow me to get rid of this step!

Envisioning a label-key field much like node-key.

Looking at the code, I do see that the filter method expects a label field which would seem to require a change as it is not possible to access other props i.e. label-key inside a prop default function AFAIK

    filterMethod: {
      type: Function,
      default (node, filter) {
        const filt = filter.toLowerCase()
        return node.label && node.label.toLowerCase().indexOf(filt) > -1
      }
    },

@krugerpl
Copy link

Hi,
+1 for this feature.
It will be nice to have this feature also for other components that use label field.

@rstoenescu rstoenescu added this to the v0.17.11 milestone Aug 28, 2018
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

3 participants