Comments (3)
I think a hack would be to reinit the NavBar when i click a link. But is it a good work around ? Nope
from elm-bootstrap.
it actually works wonderful (the hack), but shall I give it a try to suggest a better way for how to handle this?
from elm-bootstrap.
The "hack":
( ClickedLink urlRequest, _ ) ->
case urlRequest of
Browser.Internal url ->
case url.fragment of
Just _ ->
-- If we got a link that included a fragment,
-- we ignore this url change, because we dont care about hash urls
( model, Cmd.none )
Nothing ->
let
( newNavState, newNavCmd ) =
Navbar.initialState NavbarMsg
in
( { model | navState = newNavState }
, Cmd.batch [ newNavCmd, Nav.pushUrl (Session.navKey (toSession model.page)) (Url.toString url) ]
)
Browser.External href ->
( model
, Nav.load href
)
from elm-bootstrap.
Related Issues (20)
- Progress bar height attribute should be in the wrapper
- Vertical Buttongroups should use only class "btn-group-vertical"
- Website on v5.0.0 docs HOT 1
- Radio buttons using ... buttons?
- Form.Range is not exposed in elm.json file HOT 2
- Modal header "close" button should have `type="button"`
- Config Bootstrap.Navbar.collapseSmall
- Cannot use Flex HOT 1
- Modal Scrollable Body config does not actually work
- Error in documentation for Pagination
- attrs is not exposed by Alert
- Block.text in a single line
- Spinner.spinner does not work with bootstrap 4.0.0
- Support .form-row
- Expose a way to know which tab is active HOT 6
- Clicking on the navbar dropdown menu changes the current url
- How to create Navbar submenus? HOT 2
- Any plan to upgrade to Bootstrap 5 ?
- No backdrop on second modal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-bootstrap.