Skip to content

Commit

Permalink
Merge pull request #143 from shariquerik/add-tooltip-on-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik authored Jan 29, 2022
2 parents 95a2399 + 5db2418 commit a278075
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/rowmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ export default class RowManager {
if (props.isFilter) {
row = row.map(cell => (Object.assign({}, cell, {
content: this.getFilterInput({
colIndex: cell.colIndex
colIndex: cell.colIndex,
name: cell.name
}),
isFilter: 1,
isHeader: undefined,
Expand All @@ -350,8 +351,10 @@ export default class RowManager {
}

getFilterInput(props) {
let title = `title="Filter based on ${props.name || 'Index'}"`;
const dataAttr = makeDataAttributeString(props);
return `<input class="dt-filter dt-input" type="text" ${dataAttr} tabindex="1" />`;
return `<input class="dt-filter dt-input" type="text" ${dataAttr} tabindex="1"
${props.colIndex === 0 ? 'disabled' : title} />`;
}

selector(rowIndex) {
Expand Down

0 comments on commit a278075

Please sign in to comment.