Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

KTDatatable Row Checked By Default


VUEJS Template
I am using KTDatable with:checkbox-enabled = "true" and getting data from the server side
Response:
[
{
"id": 1,
"name": "User 1",
"checked": true
},
{
"id": 2,
"name": "User 2",
"checked": false
}
]

How can check this row by default?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


The only catch is that your recordings inside the 8 hours will have weird start timings, but other than that, it works well.



Hi,

Our Vue experts will look into your issue ASAP. In the meantime can you please provide us your Metronic version?

Regards.



Hi

Version is 8.1.9



Hi Muhamed,

Sorry for the late reply.

Currently, we do not have any way to set default selected items in our KTDatatable component. I will create a task to implement this in the next releases.

For now, you can consider reusing the solution from our HTML version.
https://preview.keenthemes.com/html/metronic/docs/general/datatables/overview

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(