question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

data-value and data-text in from html example

See original GitHub issue

Description

I’m trying something out where I have a Bootstrap Table from html.

It’s basically an existing app where we want to spice some tables with search and sort functionality.

As the tables are based on html some of the column fields contain html like to link to a detail page , or even other tags for cosmetic purpose like showing Bootstrap Badges.

Now when searching it also matches results from the html code - which makes sense.

Without rewriting the whole tables I was looking if I could do something smart and then I noticed data-value and data-text in the from html example: https://examples.bootstrap-table.com/#welcomes/from-html.html

This sounded exactly what I wanted and I thought the data-value attribute could be use as value for eg the search and sort. But this attribute does not seem to do anything unfortunately.

  1. What is the usage/idea behind these data-value and data-text attributes in the official from html example?
  2. if these attributes are not meant for what Inwas hoping for os there something else I can do except rewriting the table; if no other solution I will do that but I want to explore my options.

Example(s)

https://examples.bootstrap-table.com/#welcomes/from-html.html

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
marceloverdijkcommented, Sep 18, 2022

😄 I agree… https://en.wikipedia.org/wiki/Adolf_Brudes (racing driver). As his name starts with an “A” he is almost on top of my table 😉

1reaction
UtechtDustincommented, Sep 18, 2022

Thanks for the good comments and examples. But i’m not sure if Adolf is a good example in combination with a german flag 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the usage of DataTextField and DataValueField in ...
DataTextField is what the user can see. DataValueField is what you can use for identify which one is selected from DropDownList. For example...
Read more >
HTML data-* Attribute - W3Schools
The data-* attribute is used to store custom data private to the page or application. The data-* attribute gives us the ability to...
Read more >
dropdownbox properties datatext field and datavalue field
i wanted to ask when we want to fill dropdownbox with value from the database we write like this query "select id ,...
Read more >
What is reason for datavaluefield when we have datatext field ...
Rendered HTML: <select name="DropDownList1" id="DropDownList1"> <option value="datavaluefield1">datatext 1</option> <option ...
Read more >
What is the difference between data text field and data value ...
Use the DataTextField and DataValueField properties to specify which field in the data source to bind to the Text and Value properties of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found