AllenFang/react-bootstrap-table

Extend filters to allow html attributes to be passed down

開放

#1,715 建立於 2017年10月26日

 (1 則留言) (0 個反應) (0 位負責人)JavaScript (795 個分叉)batch import
help wantedin progress

倉庫指標

星標
 (2,240 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hello. Currently it appears there is no way to add an html attribute to the underlying markup that is generated by the built-in filters such as <SelectFilter>.

My use-case would be adding an id, data, or aria attribute to the html elements such as a <select>.

Attributes are passed to the component in the JSX. https://github.com/AllenFang/react-bootstrap-table/blob/281db991c08f1d4cad2c522b13875a97d2e27e0f/src/TableHeaderColumn.js#L70

But they aren't shared with the HTML elements. https://github.com/AllenFang/react-bootstrap-table/blob/281db991c08f1d4cad2c522b13875a97d2e27e0f/src/filters/Select.js#L98-L104

I'm happy to submit a PR if you agree with the use.

貢獻者指南