fix: Adding tooltip on filter inputs
This commit is contained in:
parent
cb2729424b
commit
88a361f053
@ -325,7 +325,8 @@ export default class RowManager {
|
|||||||
if (props.isFilter) {
|
if (props.isFilter) {
|
||||||
row = row.map(cell => (Object.assign({}, cell, {
|
row = row.map(cell => (Object.assign({}, cell, {
|
||||||
content: this.getFilterInput({
|
content: this.getFilterInput({
|
||||||
colIndex: cell.colIndex
|
colIndex: cell.colIndex,
|
||||||
|
name: cell.name
|
||||||
}),
|
}),
|
||||||
isFilter: 1,
|
isFilter: 1,
|
||||||
isHeader: undefined,
|
isHeader: undefined,
|
||||||
@ -347,8 +348,10 @@ export default class RowManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getFilterInput(props) {
|
getFilterInput(props) {
|
||||||
|
let title = `title="Filter based on ${props.name || 'Index'}"`;
|
||||||
const dataAttr = makeDataAttributeString(props);
|
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) {
|
selector(rowIndex) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user