Prevent selection of some rows in q-table



  • Hello, I have a QTable with selection enabled. I would like to prevent the selection of some rows under certain conditions (for example when some cells of the row are empty or contain certain values).
    What is the best strategy to use?

    Thanks in advance



  • @carrypotter you will probably need to use body slot and do the logic there, ie. ... <q-td ...><q-checkbox :value="props.selected" @input="v => { props.row.somedata ...<your condition> ? props.selected = v : ...do nothing }" .../>.



  • Thanks @metalsadman. I solved with update:selected event where i check and remove invalid selected row.


Log in to reply