No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. michalskop
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 0
    • Groups 0

    michalskop

    @michalskop

    0
    Reputation
    276
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    michalskop Follow

    Latest posts made by michalskop

    • DataTable - compiling data from more JSONs, default view

      I want to have a DataTable with data compiled from 2 JSONs (questions, answers). I have:
      The component:

      <q-data-table
           :data="data"
           :config="config"
           :columns="columns"
           ref="table" >
      </q-data-table>
      

      I load the datasets:

      import questions from '../data/questions.json'
      import answers from '../data/answers.json'
      import { QDataTable } from 'quasar'
      

      Then I export the component:

      export default {
          data: function () {
              questions,
              answers,
              data: [{}],
              columns: [],
              config: {
                  leftStickyColumns: 1,
                  noHeader: false,
                  // other configuration
              }
          },
          mounted: function () {
              // first column:
              this.columns.push({
                  label: 'Question',
                  field: 'question',
                  width: '100px',
                  type: 'string'
              })
              // other columns
              this.answers.map((answer) => {
                  this.columns.push({
                      label: answer.name,
                      field: answer.id,
                      width: '15px',
                      type: 'string'
                  })
              })
              // data from 2 files:
              this.questions.map((question) => {
                  var item = {}
                  item.question = question.question
                  this.answers.map((answer) => {
                      item[answer.id] = answer['votes'][question.id]
                  })
                  this.data.push(item)
              })
          },
          components: {
              QDataTable
          }
      }
      

      And the problems:

      • No columns are shown at the load, I must select them manually in the Column Picker
      • Is it possible to show just some of the columns at load and leave the rest for the Column Picker?)
      • Is is possible to style the column name? (e.g., add picture/icon based on column name/description)
      posted in Help
      M
      michalskop
    • RE: Testing browser compatibility

      @rstoenescu
      Thanks for your reply, but do not put down your bets so quickly (-:

      I have tested several of my computers/mobiles and found the blank page (sometimes showing the toolbars) in my older mobile FF (v.28), Opera (v. 18), Android Browser (v.4), as well as on my very new mobile with default MIUI browser (which is Chrome 53 in disguise), also my older Windows 7 computer had problems (IE 9).

      The “blank page” is not a problem per se. I checked the logs/analytics and the (more) older versions of browsers account for <5% (except for the IE11, which accounted for 8% itself) of the traffic. But it would be nice to have a way (probably not Quasar-unique one) to check the browser and if it does not support necessary stuff for Quasar, than to show the user some information “Sorry, …”. Showing blank screen is bad, showing info “your browser is not supported” is ok.

      Something like testing it with Modernizr (but I do not have any idea, which features to test in this case).

      posted in Framework
      M
      michalskop
    • Testing browser compatibility

      Do you know a way to test browser compatibility with last Quasar?

      I do not mind not supporting old browsers, but it would be nice at least display something like “Sorry, your browser is not supported, use X, Y or Z” instead of just showing a blank page.

      posted in Framework
      M
      michalskop