mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
DataTable: new filterButtonProp
property
This commit is contained in:
parent
1cbaf36aa0
commit
a0c3e47afd
6 changed files with 84 additions and 9 deletions
33
components/lib/datatable/DataTable.d.ts
vendored
33
components/lib/datatable/DataTable.d.ts
vendored
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
import { InputHTMLAttributes, TableHTMLAttributes, TransitionProps, VNode } from 'vue';
|
||||
import { ComponentHooks } from '../basecomponent';
|
||||
import { ButtonProps } from '../button';
|
||||
import { ColumnPassThroughOptionType } from '../column';
|
||||
import { ColumnGroupPassThroughOptionType } from '../columngroup';
|
||||
import { PaginatorPassThroughOptionType } from '../paginator';
|
||||
|
@ -159,6 +160,28 @@ export interface DataTableExportCSVOptions {
|
|||
selectionOnly: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom datatable filter button props options.
|
||||
*/
|
||||
export interface DataTableFilterButtonPropsOptions {
|
||||
/**
|
||||
* Add rule button props
|
||||
*/
|
||||
addRule: ButtonProps | undefined;
|
||||
/**
|
||||
* Remove rule button props
|
||||
*/
|
||||
removeRule: ButtonProps | undefined;
|
||||
/**
|
||||
* Apply button props
|
||||
*/
|
||||
apply: ButtonProps | undefined;
|
||||
/**
|
||||
* Apply button props
|
||||
*/
|
||||
clear: ButtonProps | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom sort event.
|
||||
* @see {@link DataTableEmits.sort}
|
||||
|
@ -1130,6 +1153,16 @@ export interface DataTableProps {
|
|||
* Used to pass all properties of the HTMLInputElement to the focusable filter input element inside the component.
|
||||
*/
|
||||
filterInputProps?: InputHTMLAttributes | undefined;
|
||||
/**
|
||||
* Used to pass all filter button property object
|
||||
* @defaultValue {
|
||||
addRule: { severity: 'info', text: true, size: 'small' },
|
||||
removeRule: { severity: 'danger', text: true, size: 'small' },
|
||||
apply: { size: 'small' },
|
||||
clear: { outlined: true, size: 'small' }
|
||||
}
|
||||
*/
|
||||
filterButtonProps?: DataTableFilterButtonPropsOptions | undefined;
|
||||
/**
|
||||
* Used to pass attributes to DOM elements inside the component.
|
||||
* @type {DataTablePassThroughOptions}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue