-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Yew 0.20 #1
Open
aknarts
wants to merge
2
commits into
LexLuengas:master
Choose a base branch
from
aknarts:yew0.20
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||
[package] | ||||||
name = "yew-table" | ||||||
version = "0.1.2" | ||||||
version = "0.2.0" | ||||||
authors = ["Alexis Luengas <alexis.luengas@gmail.com>"] | ||||||
edition = "2018" | ||||||
repository = "https://github.com/LexLuengas/yew-table" | ||||||
|
@@ -14,5 +14,5 @@ description = "A table component for the Yew web framework" | |||||
|
||||||
[dependencies] | ||||||
serde = { version = "1.0.93", features = ["derive"] } | ||||||
serde-value = "0.6.0" | ||||||
yew = "0.6.0" | ||||||
serde-value = "0.7.0" | ||||||
yew = "0.20.0" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
[package] | ||
name = "yew-app" | ||
version = "0.1.2" | ||
version = "0.2.0" | ||
authors = ["Alexis Luengas <alexis.luengas@gmail.com>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
log = "0.4" | ||
chrono = { version = "0.4", features = ["serde"] } | ||
web_logger = "0.1" | ||
smart-default = "0.5.2" | ||
wasm-logger = "0.2" | ||
smart-default = "0.6.0" | ||
serde = { version = "1.0.93", features = ["derive"] } | ||
strum = "0.15.0" | ||
strum_macros = "0.15.0" | ||
serde-value = "0.6.0" | ||
yew = "0.6.0" | ||
strum = "0.24.1" | ||
strum_macros = "0.24.3" | ||
serde-value = "0.7.0" | ||
yew = { version = "0.20.0", features = ["csr"] } | ||
yew-table = { path = "../.." } | ||
|
||
[dependencies.rand] | ||
version = "0.6.5" | ||
features = ["stdweb"] | ||
|
||
[profile.release] | ||
debug = true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Yew Table</title> | ||
<link rel="icon" href="data:,"> | ||
<style> | ||
html { | ||
font-size: 16px; | ||
} | ||
|
||
table.yew-table { | ||
border: 1px solid #ccc; | ||
border-collapse: collapse; | ||
} | ||
|
||
table.yew-table td, table.yew-table th { | ||
border: 1px solid #ccc; | ||
padding: 2px 4px; | ||
} | ||
|
||
table.yew-table.is-orderable thead { | ||
cursor: pointer; | ||
} | ||
|
||
table.yew-table thead th > span { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
table.yew-table thead th i.sorting-control { | ||
font-size: 0.5rem; | ||
line-height: 1em; | ||
display: inline-flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-left: 4px; | ||
} | ||
|
||
table.yew-table.is-orderable thead th i.sorting-control:before { | ||
content: "▲"; | ||
color: #ccc; | ||
} | ||
|
||
table.yew-table.is-orderable thead th i.sorting-control:after { | ||
content: "▼"; | ||
color: #ccc; | ||
} | ||
|
||
table.yew-table thead th i.sorting-control.is-sorting-descending:before { | ||
color: black; | ||
} | ||
|
||
table.yew-table thead th i.sorting-control.is-sorting-ascending:after { | ||
color: black; | ||
} | ||
</style> | ||
</head> | ||
<base data-trunk-public-url/> | ||
</head> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, these are outdated because that is how long this PR was open :). It should pretty much just work as is. even with the update. I just have a copy of this in my projects...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shimwell I ended up creating a new repo with this if you want to use it https://github.com/aknarts/yew-custom-components did not publish yet because I am not sure I can take that name and trying to think of a better one. The table example is live here: https://aknarts.github.io/yew-custom-components/#/table
Rewrote it to Function Component, and added the ability for the data to be updated in real time and the table preserves sorting.