File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
44## [ Unreleased]
55### Added
66- Implemented ` v-model ` on the page property ` pf-paginate-control ` components.
7+ - Implemented two-way syncing of ` sort-by ` and ` sort-direction ` properties in ` pf-table ` .
78- Implemented ` pf-application-launcher ` and ` pf-launcher-item ` .
89- Implemented ` pf-notification-bell ` as a toggler for the ` pf-drawer ` .
910- Added ` navbar-brand-name ` CSS class to correctly style text-only brand titles.
Original file line number Diff line number Diff line change 1515 :selectable =" table.selectable"
1616 :sortable =" table.sortable"
1717 :scrollable =" table.scrollable"
18- :sort-by =" table.sortBy"
19- :sort-direction =" table.sortDirection"
20- @sort-by =" setSort"
18+ :sort-by.sync =" table.sortBy"
19+ :sort-direction.sync =" table.sortDirection"
2120 style =" height :250px " >
2221 <template scope="data">
2322 <td style =" width :50px " >#{{data.row.id}}</td >
@@ -223,12 +222,5 @@ export default {
223222 },
224223 };
225224 },
226-
227- methods: {
228- setSort (field , direction ) {
229- this .table .sortBy = field;
230- this .table .sortDirection = direction;
231- },
232- }
233225};
234226 </script >
Original file line number Diff line number Diff line change @@ -214,6 +214,8 @@ export default {
214214 methods: {
215215 setSortBy (field , direction ) {
216216 this .$emit (' sort-by' , field, direction);
217+ this .$emit (' update:sortBy' , field);
218+ this .$emit (' update:sortDirection' , direction);
217219 },
218220
219221 changeSelectAll (e ) {
You can’t perform that action at this time.
0 commit comments