Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Trying to use Tecton q2-data-table.

I am having trouble getting <q2-data-table> tecton component to work.

Should be pretty simple... I've tried a number of different ways... other q2 UI components seem to work. In the below example, btn_submit is retrieved and set to disabled... However, the q2-data-table (as copied from the example in https://tecton.q2developer.com/ui/q2-data-table ) is not displayed. Simple example, in templates/index.html.jinja2:

(Apologies for the formatting... not working so well)

<q2-data-table id="accounttable" name="accounttable" caption="Recent Sales">
</q2-data-table>
<q2-btn intent="workflow-primary" id=btn_submit onclick="validateForm(event)">Get Transaction History
</q2-btn>
<script src="{{ this.base_assets_url }}/index.js"></script>

In frontend/index.js

```

// This code will execute after tecton has initialized.
tecton.connected.then(function() {

  const accountlist = document.querySelector('q2-data-table');
  const btn = document.getElementById('btn_submit');
  btn.disabled = true;
  btn.intent = "workflow-secondary";

  accountlist.headers = [
    {
      title: 'Day of Week',
      key: 'day',
    },
    { 
      title: 'Sales', 
      key: 'sales', 
      align: 'center'
    },
  ];
  accountlist.rows = [
    {
      id: 1,
      cells: {
        day: 'Monday',
        sales: 93,
      },
    },
    {
      id: 2,
      cells: {
        day: 'Tuesday',
        sales: 127,
      },
    },
    {
      id: 3,
      cells: {
        day: 'Wednesday',
        sales: 121,
      },
    }
  ];

  //alert("Title: " & accountlist.id);

});

	
I did notice that q2-data-table is not listed in https://cdn4.onlineaccess1.com/cdn/base/tecton/v1.25/Documentation/ui  while it is listed in https://tecton.q2developer.com/ui
	
	
Please advise.   Thanks!
Votes Newest

Answers


Mark, it appears the q2-data-table feature was added in version 1.29 of tecton. You will need to upgrade in order to take advantage of that feature.

From you command line in the SDK, type "q2 upgrade". Select q2-tecton and upgrade to the latest. If you have any issues upgrading, please let us know.

Posted 3 years ago
0

Yes! @<1546660218744606720|Greg Varnell> Thank you!

— Mark Woollen   3 years ago
104 Views
1 Answer
3 years ago
3 years ago