Commit Graph

44 Commits

Author SHA1 Message Date
Chun-MingChen
a37186cec3 set sort caret to grey if not sorting 2017-10-15 20:40:40 +08:00
Chun-MingChen
26f38c54d8 allow boostrap table to multiple-sort
* Record all values of columns sort order in the table of sortOrder
2017-10-15 20:36:52 +08:00
chunming
877259158e fix #50
* implement row single and multiple selection

* radio button for single, checkbox for multiple
* update component if status was changing

* implement header cell for row selection

* render checkbox for multiple, nothing for single
* default css for th[data-th-row-selection]
* update component if status was changing

* transform cursor to pointer when hover button radio and checkbox

* story for single and multiple rows selection

* remove props required field and turn off eslint

* [test] adapt with other component

* props resolver for cell selection

* if row selection was disabled, return mode 'ROW_SELECT_DISABLED'

* refactor row selection cell

* rename to selection-cell
* remove unnecessary props
* better coding style

* props resolver for header cell selection

* refactor row selection for header cell

* rename to selection-header-cell
* remove unnecessary props
* better coding style
* new logic for handleSelectAllRows

* tunning for multi selection logic

* allow user to customize select all result
* remove cursor point
* remove uncessary utils

* tunning for function naming

* mock data for resolved props including both body and header

* judge cell-editable and row-selectable with mode

* [test] unit test for props-resolver

* move position of test case of cellEdit
* add test for resolveCellSelectionProps
* add test for resolveHeaderCellSelectionProps
* accept row keys for mock-component

* [test] add test for body

* [test] add test for header

* [test] add test for row

* [test] add test for selection-cell

* fix typo

* [test] add test for selection-header-cell

* add test for checkbox in selection-header-cell

* [test] add test for bootstrap-table

* test for handleRowSelect

* test for handleAllRowsSelect

* remove uncessary prop

* remove unnecessary dafault mode for selectRow

* add description for props shape
* remove uncessary declaration of inputType
* add isRequred for selectRow.mode

* [test] verify the correctness of params when clicking on selection cell

* [test] modification for test wording and unmatched data type

* handle logic of row selection inside the store

* ignore the situation of pagination
* correct the tests

* [test] add test for store/base.js

* Document for row selection

* modication for defects

* simplify proptypes to basic data type
* row selection document in README
* refactor all function test with sinon

* refactor all mock function to sinon.stub() instead jest.fn()

* fix conflict
2017-10-11 10:28:53 -05:00
chunming
30d2645e4a Improve yarn install for travis
* yarn install instead
* disable postinstall script
2017-10-11 09:53:01 -05:00
Allen
105bd36a5e refine #78
* refine #78

* patch docs for caption prop
2017-10-10 02:28:25 -05:00
Esa Juhana
3d6a293e5e fix #77
* Implement basic usage of table <caption> element

Add tableCaption prop, which can be a component / string

Add simple test and an example to Storybook

* Fix Caption example & Code syle fix for return statement

* Rename tableCaption > caption
2017-10-10 02:10:54 -05:00
Allen
7760d6a7f8 refine #71
* refine #71

* patch docs for column.editable
2017-10-10 02:03:00 -05:00
Daniil Khanin
94d21fee77 fix #66 2017-10-10 01:52:32 -05:00
Esa Juhana
c2e22d5710 Improve development setup experience by fixing misspelled areas 2017-10-07 04:16:33 -05:00
Allen
9f92b5368f fix #63 (part1 - cell editing validation)
* implement cell editing validation

* add test cases for cell editing validation

* add story for validator for cell editor

* add docs for cell editor validation
2017-09-23 04:29:37 -05:00
Daniil Khanin
ba7c2e9bb7 Allow focus on the last character in Text Input (#65) 2017-09-23 01:15:01 -05:00
Allen
f6eea2f659 fix #60
* implement cell editor

* keyField shouldn't be editable

* add additional check to avoid some bugs

* add jsdom for enzyme mount

* add some helpers class for enzyme mounting

* add testing for cellEdit

* use npm instead

* add test for TableResolver

* table-layout: fixed; to fix the columns width when content of td changed

* add stories for cell edit

* add document for cellEdit
2017-09-20 11:18:57 -05:00
Allen
2e10cb132e fix #47
* implement table sort

* path for component test for table sort

* add store/base test

* add store/sort test

* add story for sort

* add column.sort and column.sortFunc
2017-09-16 01:33:25 -05:00
ChunMing, Chen
ec1a927001 fix #56
* redefine cell callback function

* it takes 4 argus `content`, `row`, `rowIndex` and `columnIndex` in
* sequence.

* [test] fix unit test for new callback

* correct the version of story for new cell callback

* [DOC] re-define structure of Contents of Table

* [DOC] update document for attrs

* re-write description for each column props

* [DOC] update document for headerCell

* re-write and add extra description for each header column props
2017-09-16 00:03:07 -05:00
ChunMing, Chen
79fb2523d4 fix #51
* allow user to customize attrs for column cell

* [test] add test for customized cell attrs

* allow user to customize attrs for header column cell

* [test] add test for customized header cell attrs

* update document

* add new utils isObject and isEmptyObject

* make cell attrs lowest priority

* if style, event, classes, hidden, style was not given, display the
* HTML attributes if it's legal. However, if the attributes mentioned
* above was defined at the same time, column.attrs has lowest priority
* and it will be overwrited.

* [test] unit test for column.attrs

* [test] unit test for column.headerAttrs

* update Document

* rename story name

* fix lint error
2017-09-12 10:47:27 -05:00
ChunMing, Chen
9199484ab6 setup enhancement
* lerna bootstrap after install

* set npmClient to default instead of yarn to prevent from causing error with older yarn version
* ref: https://github.com/lerna/lerna/pull/897

* update yarn.lock
2017-09-08 21:58:26 -05:00
ChunMing, Chen
f9ccbd0717 examples enhance
* utils for products generator

* load test for each *.test.js file in packages folder

* [test] unit test for utils/common

* refactor all products with productGenerator for all examples

* refactor folder structure

* move component <Code /> to src/components/common
* rename component file name
2017-09-04 08:46:01 -05:00
Allen
ae5c677854 Implement stateful layer (#48)
* implement an internal stateful layer for data change(update/insert/delete)

* BootstrapTable -> BootstrapTableful
2017-09-03 02:25:56 -05:00
ChunMing, Chen
82b827561d Enhancement/code prettify (#46)
* beautify code block with google-code-prettify

* prettyPrint when componentDidMount
* css style for code block

* skip rule 'no-unresolved' for eslint

* conflict with webpack resolve path

* refactor all code block in example folder with component <Code />

* refactor scss folder structure

* specify the responsibility for each stylesheet with file name

* load local color themes, tomorrow, for google code prettify

* re-select demo color and save into variable

* unify the color system for storybook
2017-09-03 00:31:58 -05:00
ChunMing, Chen
67c37e95f9 fix #18
* allow user to customize class for header cell

* add corresponding story

* allow user to customize inline-style for header cell

* add corresponding story

* [test] unit test for headerStyle

* [test] unit test for headerClasses

* update Document
2017-09-02 06:15:34 -05:00
Allen
9f9f78e73b fix #40
* add missing dependenies

* tuning webpack loader for scss

* implement noDataIndication

* add story for noDataIndication prop

* patch yarn.lock
2017-09-02 06:10:24 -05:00
Allen
47e807672f refine the relation for props resolver and internal store 2017-09-02 03:45:53 -05:00
Allen
6f45ae7886 fix #31
* implement column.hidden

* add story for column.hidden

* add docs for column.hidden
2017-09-02 02:36:26 -05:00
Allen
60d4e7e5d2 fix #34
* add basic stories

* add google-prettify

* add google-code-prettify-theme

* add code example for each story

* add column stories

* add header column stories
2017-09-02 01:54:09 -05:00
ChunMing, Chen
c09bf7c2f1 enhance storybook
* wrapper components with Decorators to set component margin

* add sticker github-corners at welcome page

* refactor welcome page for storybook

* refactor scss code structure
* add type.js to animate sub title
2017-08-27 19:52:49 -05:00
Allen
507e5544de fix #11
* create document

* CONTRIBUTING

* refine contributing docs

* patch for some propTypes definition missing
2017-08-27 10:55:38 -05:00
ChunMing, Chen
ee6afcb705 fix #17
* storybook environment setup

* customized loader
* add basic example of BasicTable

* add script to bootstrap storybook

* import bootstrap css for storybook

* update webpack.config for adding loader for font and css

* add sass loader and allow to customize css for storybook

* uncheck lint for react-bootstrap-table-example

* package example has its own lint check

* run yarn in each package when boostrapping lerna

* add peerDependencies for package example
2017-08-27 10:05:24 -05:00
Allen
4da199f4fc fix #29 2017-08-26 04:55:00 -05:00
Allen
b00007cde9 fix #26 2017-08-26 04:36:24 -05:00
Allen
b2bd0fc81a implement align on header & body cell (#27)
fix #24
2017-08-26 04:05:25 -05:00
Allen
95ca444edd add event hooks on column (#25)
fix #23
2017-08-26 03:06:10 -05:00
Allen
20bb9c0d1b Implement column title (#22)
fix #21
2017-08-26 02:24:00 -05:00
Allen
1c07b6cbd3 Implement custom style/class on cell (#20)
fix #19
2017-08-22 10:35:13 -05:00
ChunMing, Chen
f62d4b1130 CI environment setup (#16)
fix #7
2017-08-20 07:36:23 -05:00
Allen
1e32ea245f Support nested data (#15)
fix #14
2017-08-20 07:02:14 -05:00
Allen
7c424a2373 Implement column formatter (#13)
fix #12
2017-08-20 04:04:45 -05:00
Allen
6b7d1f9aa2 Allen/feature 9 (#10)
Fix #9
2017-08-20 01:43:24 -05:00
Allen
5b7a891b25 Bootstrap table base (#8)
Fix #6
2017-08-20 01:00:25 -05:00
ChunMing, Chen
23cb0fd160 [develop] environment setup for testing (#4)
* add yarn.lock

* test environment setup with jest

* allow eslint to suit for jest

* run lint before starting testing

* disable deprecated rule of 'react/jsx-space-before-closing'

* add CONTRIBUTING document

* specify how to start testing

* add Enzyme for React testing

* add testing template for bootstrap-table
2017-08-19 06:01:17 -05:00
AllenFang
4d6ad8d7e8 init for starting develop 2017-08-19 14:55:04 +08:00
AllenFang
bd58b436e4 README 2017-08-14 21:05:29 +08:00
AllenFang
ef925e572a init 2017-08-14 20:56:14 +08:00
AllenFang
0a717cb085 README 2017-08-14 20:52:20 +08:00
AllenFang
0f24338f62 README 2017-08-13 15:54:20 +08:00